diff options
author | frostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-08 23:03:18 +0000 |
---|---|---|
committer | frostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-08 23:03:18 +0000 |
commit | 907ee6a7d3798f9f8d500c7f139205b756235d38 (patch) | |
tree | ab322eafd4a40cbac63f57e869842d9f54ff81de /.inspircd.inc | |
parent | 2e5bad993ea8348397a47c03529870a3b99ed57b (diff) |
Modified to kill -9, if a kill -TERM fails.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1018 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to '.inspircd.inc')
-rw-r--r-- | .inspircd.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.inspircd.inc b/.inspircd.inc index 78c75f32c..2cee69712 100644 --- a/.inspircd.inc +++ b/.inspircd.inc @@ -94,7 +94,14 @@ sub stop { if (getstatus() == 0) { print "InspIRCd is not running. (Or PID File not found)"; return 0; } # Get to here, we have something to kill. my $pid = getprocessid(); + print "Stopping InspIRCd...\n" system("kill -TERM $pid >/dev/null 2>&1"); + sleep 2; + if (getstatus() == 1) + { + print "InspIRCd not dying Quietly -- Forcing Kill\n"; + system("kill -9 $pid >/dev/null 2>&1"); + } print "InspIRCd Stopped.\n"; } |