Comment 1 for bug 75058

Revision history for this message
In , Andreas Barth (aba) wrote : Re: Bug#235196: stop target of init.d sends SIGUSR2. Using SIGHUP for restart?

tags 235196 +pending
thanks

* Shaul Karl (<email address hidden>) [040227 22:25]:
> SIGINT
> SIGTERM
> remove lock file, remove pid file, terminate immediately.
> SIGHUP
> finish all fax jobs that are currently being sent, then termi-
> nate (this is used to signal faxrunqd "I want you to terminate"
> without disturbing the normal flow of operation - SIGINT/TERM
> etc. can lead to some faxes being sent twice).

> echo -n "Stopping $DESC: $NAME."
> [ -f /var/run/mgetty-fax/$NAME.pid ] && echo || echo " (not running)"
> start-stop-daemon --stop --quiet --pidfile /var/run/mgetty-fax/$NAME.pid \
> - --oknodo --name $NAME --signal USR2
> + --oknodo --name $NAME --signal TERM

I did a HUP here, as a graceful stopping is always better, and I added
a --retry -HUP/60/-TERM, so that after 60 seconds, faxrund is stopped
the hard way.

I commited this change to cvs, so it'll be included in the next
upload.

Cheers,
Andi
--
   http://home.arcor.de/andreas-barth/
   PGP 1024/89FB5CE5 DC F1 85 6D A6 45 9C 0F 3B BE F1 D0 C5 D1 D9 0C