aboutsummaryrefslogtreecommitdiffstats
path: root/script/restart-mongrel
diff options
context:
space:
mode:
Diffstat (limited to 'script/restart-mongrel')
-rwxr-xr-xscript/restart-mongrel9
1 files changed, 7 insertions, 2 deletions
diff --git a/script/restart-mongrel b/script/restart-mongrel
index a5dc2431b..6fd47d32b 100755
--- a/script/restart-mongrel
+++ b/script/restart-mongrel
@@ -5,5 +5,10 @@
cd `dirname $0`
cd ..
# XXX Include path for dodgy version of daemonize package
-ruby -I/usr/lib/ruby/ /usr/bin/mongrel_rails stop
-ruby -I/usr/lib/ruby/ /usr/bin/mongrel_rails start -d
+if [ -e log/mongrel.pid ]
+then
+ ruby -I/usr/lib/ruby/ /usr/bin/mongrel_rails restart
+else
+ ruby -I/usr/lib/ruby/ /usr/bin/mongrel_rails start -d
+fi
+