aboutsummaryrefslogtreecommitdiff
path: root/www/ruby-cruisecontrolrb
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2010-12-23 15:32:11 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2010-12-23 15:32:11 +0000
commit7c530f08a5fe204e5942664027367267c3f2291d (patch)
tree06062ce38dc28de44775efd6615ba74881143ae7 /www/ruby-cruisecontrolrb
parent961578f02c4dcc1ef9c8bba898057311397c19aa (diff)
Notes
Diffstat (limited to 'www/ruby-cruisecontrolrb')
-rw-r--r--www/ruby-cruisecontrolrb/files/cruisecontrolrb.in17
1 files changed, 10 insertions, 7 deletions
diff --git a/www/ruby-cruisecontrolrb/files/cruisecontrolrb.in b/www/ruby-cruisecontrolrb/files/cruisecontrolrb.in
index e6a4658c53f0..58e735964db6 100644
--- a/www/ruby-cruisecontrolrb/files/cruisecontrolrb.in
+++ b/www/ruby-cruisecontrolrb/files/cruisecontrolrb.in
@@ -27,14 +27,17 @@ cruisecontrolrb_start() {
${command} start ${command_args}
}
cruisecontrolrb_stop() {
- kill $(cat $pidfile)
+ if [ -f $pidfile ]; then
+ kill $(cat $pidfile)
+ fi
## also stop the builders
- cd %%PREFIX%%/www/${name}/tmp/pids/builders/
- for builder in $(ls); do
- kill $(cat $builder)
- rm ${builder}
- }
- done
+ if [ -d %%PREFIX%%/www/${name}/tmp/pids/builders ]; then
+ cd %%PREFIX%%/www/${name}/tmp/pids/builders
+ for builder in $(ls); do
+ kill $(cat $builder)
+ rm ${builder}
+ done
+ fi
}
load_rc_config $name