scripts: Wait up to 10 seconds when shutting down the CORE daemon.

This commit is contained in:
tgoff0 2015-01-28 02:15:58 +00:00
parent 8ce480a25d
commit e0894a321e

View file

@ -70,6 +70,7 @@ PIDFILE=/var/run/core-daemon.pid
if [ $DEB = yes ]; then if [ $DEB = yes ]; then
daemon="start-stop-daemon --start -p ${PIDFILE} --exec /usr/bin/python --" daemon="start-stop-daemon --start -p ${PIDFILE} --exec /usr/bin/python --"
#daemon=start_daemon #daemon=start_daemon
killproc="start-stop-daemon --stop --quiet --oknodo --retry 10"
status=status_of_proc status=status_of_proc
msg () { msg () {
log_daemon_msg "$@" log_daemon_msg "$@"
@ -79,6 +80,7 @@ if [ $DEB = yes ]; then
} }
else else
daemon="daemon /usr/bin/python" daemon="daemon /usr/bin/python"
killproc="killproc -d 10"
status=status status=status
msg () { msg () {
echo -n $"$@" echo -n $"$@"
@ -99,7 +101,7 @@ start() {
stop() { stop() {
msg "Shutting down core-daemon" msg "Shutting down core-daemon"
killproc -p ${PIDFILE} $cored $killproc -p ${PIDFILE} $cored
RETVAL=$? RETVAL=$?
rm -f ${PIDFILE} rm -f ${PIDFILE}
endmsg endmsg