aboutsummaryrefslogtreecommitdiffstats
path: root/script/restart-mongrel
diff options
context:
space:
mode:
authorfrancis <francis>2008-04-10 20:00:30 +0000
committerfrancis <francis>2008-04-10 20:00:30 +0000
commitfb896d1a2cf20ea58a4df02887e6ee255892af46 (patch)
tree2173f660a65d12322ea788f10719fb8c9992230f /script/restart-mongrel
parentd44f7a0677a2c156ece62c4c8149ebbd3d6a2476 (diff)
Better restart
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
+