foreman-capistrano 0.52.0 → 0.52.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/foreman/capistrano.rb +6 -6
- data/lib/foreman/version.rb +1 -1
- metadata +1 -1
data/lib/foreman/capistrano.rb
CHANGED
@@ -38,27 +38,27 @@ if defined?(Capistrano)
|
|
38
38
|
|
39
39
|
desc "Start the application services"
|
40
40
|
task :start, :roles => :app do
|
41
|
-
if foreman_format == 'upstart'
|
41
|
+
if fetch(:foreman_format, "upstart") == 'upstart'
|
42
42
|
run "#{sudo} start #{application}"
|
43
|
-
elsif foreman_format == 'monit'
|
43
|
+
elsif fetch(:foreman_format, "upstart") == 'monit'
|
44
44
|
run "monit start -g #{application}"
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
48
|
desc "Stop the application services"
|
49
49
|
task :stop, :roles => :app do
|
50
|
-
if foreman_format == 'upstart'
|
50
|
+
if fetch(:foreman_format, "upstart") == 'upstart'
|
51
51
|
run "#{sudo} stop #{application}"
|
52
|
-
elsif foreman_format == 'monit'
|
52
|
+
elsif fetch(:foreman_format, "upstart") == 'monit'
|
53
53
|
run "monit stop -g #{application}"
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
57
|
desc "Restart the application services"
|
58
58
|
task :restart, :roles => :app do
|
59
|
-
if foreman_format == 'upstart'
|
59
|
+
if fetch(:foreman_format, "upstart") == 'upstart'
|
60
60
|
run "#{sudo} start #{application} || #{sudo} restart #{application}"
|
61
|
-
elsif foreman_format == 'monit'
|
61
|
+
elsif fetch(:foreman_format, "upstart") == 'monit'
|
62
62
|
run "monit restart -g #{application}"
|
63
63
|
end
|
64
64
|
end
|
data/lib/foreman/version.rb
CHANGED