From 49c28acc8a4187092c4fbf3d6698f497a45ca057 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Fri, 3 Oct 2014 17:23:44 +0000 Subject: [PATCH] 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 --- files/elastic-recheck.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/elastic-recheck.init b/files/elastic-recheck.init index d32eaaf..68712ee 100644 --- a/files/elastic-recheck.init +++ b/files/elastic-recheck.init @@ -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/*