diff options
Diffstat (limited to 'community/dbmail/dbmail.rc.d')
-rw-r--r-- | community/dbmail/dbmail.rc.d | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/community/dbmail/dbmail.rc.d b/community/dbmail/dbmail.rc.d index 9286809df..f849b1679 100644 --- a/community/dbmail/dbmail.rc.d +++ b/community/dbmail/dbmail.rc.d @@ -23,9 +23,11 @@ case "$1" in stop) for daemon in $DBMAIL_DAEMONS; do stat_busy "Stopping DbMail ${daemon}" - pid=$(cat /var/run/dbmail/${daemon}.pid) - kill $pid - sleep 4 + pid=$(cat /var/run/dbmail/${daemon}.pid 2>/dev/null) + kill $pid 2>/dev/null + while kill -0 "$pid" 2>/dev/null; do + sleep 0.2 + done stat_done done rm_daemon dbmail |