Stop the elastic-recheck bot more gracefully

* modules/elastic_recheck/files/elastic-recheck.init: It has in the
past been observed that the elastic-recheck IRC/Gerrit-commenting
bot does not always terminate cleanly. Use a retry with escalation
of kill signals in the initscript to help prevent additional old
processes from hanging around when restarts take place.

Change-Id: I9498eeeb935cb609c2c4c099c3552bed337fbe99
This commit is contained in:
Jeremy Stanley 2014-10-03 17:23:44 +00:00
parent 294bd6865d
commit 49c28acc8a
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ do_stop()
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --signal 9 --pidfile $PIDFILE
start-stop-daemon --stop --retry TERM/15/KILL/5 --pidfile $PIDFILE
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
rm -f /var/run/$NAME/*