Init script slowness

Henrique de Moraes Holschuh hmh at debian.org
Tue Oct 4 13:28:52 UTC 2011


On Tue, 04 Oct 2011, Thomas Cataldo wrote:
> diff --git a/debian/cyrus-common.cyrus-imapd.init
> b/debian/cyrus-common.cyrus-imapd.init
> index fc85485..282ac8d 100755
> --- a/debian/cyrus-common.cyrus-imapd.init
> +++ b/debian/cyrus-common.cyrus-imapd.init
> @@ -172,7 +172,7 @@ do_stop()
>      sync_stop
>      [ "$?" = 2 ] && return 2
> 
> -    start-stop-daemon --stop --quiet --retry=QUIT/30/TERM/10/KILL/5
> --pidfile $PIDFILE --name $NAME
> +    start-stop-daemon --stop --quiet --retry=TERM/10/KILL/5 --pidfile
> $PIDFILE --name $NAME
>      RETVAL="$?"
>      [ "$RETVAL" = 2 ] && return 2
> 
> 
> I have some code that does cyrus restarts and it always takes 30sec if
> someone has already connected to cyrus / is connected to cyrus.

The idea is to allow a safe shutdown, which SIGQUIT is supposed to do.
If SIGQUIT behaviour is not optimal, that's the bug that should be fixed
instead.

We can also add extra actions such as "immediate-restart" and
"force-stop" that use QUIT/5/TERM/10/KILL/5 for example.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



More information about the Pkg-Cyrus-imapd-Debian-devel mailing list