diff options
author | Roman I Khimov <khimov@altell.ru> | 2009-09-04 17:37:03 +0400 |
---|---|---|
committer | Roman I Khimov <khimov@altell.ru> | 2010-03-30 21:50:13 +0400 |
commit | 654351c29d60f2d68a648054f8324ce48b8be44d (patch) | |
tree | d6e927a19f1705286a3224a8ccd0923b2b938ec4 /recipes/clamav/files/clamav-daemon.init | |
parent | c5ffbab676b961ecbc7a9e478ba571a8872185ff (diff) |
clamav: wait on stop in init
Takes some time for clamav to shut down and it's better to return from
init script only when it actually is stopped.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Diffstat (limited to 'recipes/clamav/files/clamav-daemon.init')
-rw-r--r-- | recipes/clamav/files/clamav-daemon.init | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/recipes/clamav/files/clamav-daemon.init b/recipes/clamav/files/clamav-daemon.init index 6fd07146ea..b506ccadb3 100644 --- a/recipes/clamav/files/clamav-daemon.init +++ b/recipes/clamav/files/clamav-daemon.init @@ -28,6 +28,12 @@ case "$1" in stop) echo -n "Stopping $DESC: " start-stop-daemon -K -p $PID + for i in `seq 1 5`; do + if start-stop-daemon -p $PID -t -K >/dev/null 2>&1; then + break; + fi + sleep 1 + done ;; restart|force-reload) |