3
# cupsys example file to build /etc/init.d/ scripts.
4
# This file should be used to construct scripts for /etc/init.d.
6
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
7
# Modified for Debian GNU/Linux
8
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
10
# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl
12
# This file was automatically customized by dh-make on Sun, 3 Oct 1999 20:58:02 -0500
14
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
15
DAEMON=/usr/sbin/cupsd
17
DESC="Common Unix Printing System"
19
test -f $DAEMON || exit 0
23
# Get the timezone set.
24
if [ -e /etc/timezone ]; then
25
TZ=`cat /etc/timezone`
31
echo -n "Starting $DESC: $NAME"
32
chown root:lpadmin /usr/share/cups/model 2>/dev/null || true
33
chmod 3775 /usr/share/cups/model 2>/dev/null || true
34
start-stop-daemon --start --quiet --background -m --pidfile /var/run/cups/cupsd.pid --exec $DAEMON -- -F
38
echo -n "Stopping $DESC: $NAME"
39
start-stop-daemon --stop --quiet --retry TERM/10 --oknodo --exec $DAEMON
40
rm -f /var/run/cups/cupsd.pid
44
echo -n "Reloading $DESC: $NAME"
45
start-stop-daemon --stop --quiet --oknodo --signal 1 --exec $DAEMON
49
echo -n "Restarting $DESC: $NAME"
50
if start-stop-daemon --stop --quiet --retry TERM/10 --oknodo --exec $DAEMON; then
51
start-stop-daemon --start --quiet --background -m --pidfile /var/run/cups/cupsd.pid --exec $DAEMON -- -F
57
echo "Usage: $N {start|stop|restart|force-reload}" >&2