4
# Required-Start: $remote_fs $syslog
5
# Required-Stop: $remote_fs $syslog
6
# Default-Start: 2 3 4 5
10
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
11
DAEMON=/usr/sbin/faxrunqd
13
DESC="Fax Queue Daemon"
15
test -f $DAEMON || exit 0
17
check_for_no_start() {
18
# (function copied from ssh init script)
19
# exit if we're trying to start and /etc/mgetty/.faxrunqd_not_to_be_run exists
20
if [ -e /etc/mgetty/.faxrunqd_not_to_be_run ]; then
25
if [ ! -d /var/lock/fax ]; then
27
chown uucp:root /var/lock/fax
29
if [ ! -d /var/run/mgetty-fax ]; then
30
mkdir /var/run/mgetty-fax
31
chown uucp:root /var/run/mgetty-fax
37
if grep -q "^fax-devices" /etc/mgetty/faxrunq.config; then
38
echo -n "Starting $DESC: "
39
start-stop-daemon --start --quiet --pidfile /var/run/mgetty-fax/$NAME.pid \
40
--exec $DAEMON -- -D -u uucp -g dialout
43
echo "$DESC not yet configured while configured for starting within the debconf database."
44
echo "Please either edit /etc/mgetty/faxrunq.config or run \"dpkg-reconfigure mgetty-fax\" to fix this problem."
49
echo -n "Stopping $DESC: $NAME."
50
[ -f /var/run/mgetty-fax/$NAME.pid ] && echo || echo " (not running)"
51
start-stop-daemon --stop --quiet \
52
--retry -HUP/60/-TERM \
53
--pidfile /var/run/mgetty-fax/$NAME.pid \
54
--oknodo --name $NAME --signal HUP
58
# If the daemon can reload its config files on the fly
59
# for example by sending it SIGHUP, do it here.
61
# If the daemon responds to changes in its config file
62
# directly anyway, make this a do-nothing entry.
64
# echo "Reloading $DESC configuration files."
65
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
66
# /var/run/$NAME.pid --exec $DAEMON
70
# If the "reload" option is implemented, move the "force-reload"
71
# option to the "reload" entry above. If not, "force-reload" is
72
# just the same as "restart".
74
echo -n "Restarting $DESC: "
82
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
83
echo "Usage: $N {start|stop|restart|force-reload}" >&2