diff options
author | keith <keith> | 2008-05-30 15:43:39 +0000 |
---|---|---|
committer | keith <keith> | 2008-05-30 15:43:39 +0000 |
commit | 1bd9ad47ee172840de2a4df0357cf8963ce94778 (patch) | |
tree | 997ae0801bd4abefd5e8c12a3ff247ad3a6b065a /script/restart-mongrel | |
parent | 62dce06826d81d184274d25e45c4aee20c776592 (diff) |
Hacked it a bit so it does a kill -9 and removes the pid if need be - not fully tested
Diffstat (limited to 'script/restart-mongrel')
-rwxr-xr-x | script/restart-mongrel | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/script/restart-mongrel b/script/restart-mongrel index 004bd0b0e..9de4122a0 100755 --- a/script/restart-mongrel +++ b/script/restart-mongrel @@ -9,8 +9,20 @@ if [ -e log/mongrel.pid ] then ruby -I/usr/lib/ruby/ /usr/bin/mongrel_rails stop sleep 5s - ruby -I/usr/lib/ruby/ /usr/bin/mongrel_rails start -d + if [ -e log/mongrel.pid ] + then + if ( ps h -p `cat log/mongrel.pid`45 ) + then + echo "kill -9 ing `cat log/mongrel.pid` because it failed to stop" + kill -9 `cat log/mongrel.pid` + sleep 2s + fi + if [ -e log/mongrel.pid ] + rm log/mongrel.pid + fi + fi + ruby -I/usr/lib/ruby/ /usr/bin/mongrel_rails start -d --debug else - ruby -I/usr/lib/ruby/ /usr/bin/mongrel_rails start -d + ruby -I/usr/lib/ruby/ /usr/bin/mongrel_rails start -d --debug fi |