capistrano-daemonize 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -1
- data/Changelog +8 -0
- data/README.md +2 -2
- data/lib/capistrano-daemonize/daemonize.rb +6 -5
- data/lib/capistrano-daemonize/version.rb +2 -2
- metadata +3 -3
data/.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
*.gem
|
2
|
+
Gemfile.lock
|
data/Changelog
ADDED
data/README.md
CHANGED
@@ -21,7 +21,7 @@ You can use the `:pidfile` and `:logfile` options to defined the respective
|
|
21
21
|
files, which default to `"#{shared_path}/pids/myworker.pid"` and
|
22
22
|
`"#{shared_path}/log/myworker.log"`.
|
23
23
|
|
24
|
-
`:chdir` may be used to set the
|
24
|
+
`:chdir` may be used to set the working directory for the daemon and
|
25
25
|
`:user` to switch to another user than logged in.
|
26
26
|
|
27
|
-
Other options, like `:role` in the example above, will be used when defining the tasks.
|
27
|
+
Other options, like `:role` in the example above, will be used when defining the tasks.
|
@@ -27,7 +27,7 @@ module Capistrano
|
|
27
27
|
end
|
28
28
|
|
29
29
|
namespace name do
|
30
|
-
task :start, options do
|
30
|
+
task :start, { desc: "Start #{name}" }.merge(options) do
|
31
31
|
run <<-SCRIPT
|
32
32
|
if [ -e #{daemonize_pidfile} ]; then
|
33
33
|
echo 'pidfile exists';
|
@@ -37,18 +37,19 @@ fi;
|
|
37
37
|
#{daemonize_sudo} /sbin/start-stop-daemon --pidfile #{daemonize_pidfile} \
|
38
38
|
--start --make-pidfile --chdir #{daemonize_chdir} --user #{daemonize_user} \
|
39
39
|
--background --exec #{command.split[0]} -- #{command.split[1..-1].join(' ')} \
|
40
|
-
2>&1 >>#{daemonize_logfile} RAILS_ENV=#{rails_env}
|
40
|
+
2>&1 >>#{daemonize_logfile} RAILS_ENV=#{rails_env};
|
41
|
+
sleep 1
|
41
42
|
SCRIPT
|
42
43
|
end
|
43
44
|
|
44
|
-
task :stop, options do
|
45
|
+
task :stop, { desc: "Stop #{name}" }.merge(options) do
|
45
46
|
run <<-SCRIPT
|
46
47
|
#{sudo_command} /sbin/start-stop-daemon --stop --pidfile #{daemonize_pidfile};
|
47
48
|
rm -f #{daemonize_pidfile}
|
48
49
|
SCRIPT
|
49
50
|
end
|
50
51
|
|
51
|
-
task :restart, options do
|
52
|
+
task :restart, { desc: "Restart #{name}" }.merge(options) do
|
52
53
|
stop
|
53
54
|
start
|
54
55
|
end
|
@@ -61,4 +62,4 @@ rm -f #{daemonize_pidfile}
|
|
61
62
|
end
|
62
63
|
end
|
63
64
|
end
|
64
|
-
end
|
65
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-daemonize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -52,6 +52,7 @@ extra_rdoc_files:
|
|
52
52
|
- README.md
|
53
53
|
files:
|
54
54
|
- .gitignore
|
55
|
+
- Changelog
|
55
56
|
- Gemfile
|
56
57
|
- LICENSE
|
57
58
|
- README.md
|
@@ -85,4 +86,3 @@ signing_key:
|
|
85
86
|
specification_version: 3
|
86
87
|
summary: Control arbitrary jobs using start-stop-daemon in Capistrano
|
87
88
|
test_files: []
|
88
|
-
has_rdoc:
|