3
PATH=/bin:/usr/bin:/sbin:/usr/sbin
5
PIDFILE=/var/run/lpd.pid
7
test -x $DAEMON -a -f /usr/sbin/pac || exit 0
11
echo -n "Starting printer spooler: lpd"
12
if start-stop-daemon --quiet --stop --signal 0 --pidfile $PIDFILE --name lpd
14
echo " already running."
17
/sbin/start-stop-daemon --start --quiet --exec $DAEMON
21
echo -n "Stopping printer spooler: lpd"
22
if start-stop-daemon --quiet --stop --signal 0 --pidfile $PIDFILE --name lpd
25
start-stop-daemon --quiet --stop --exec $DAEMON --pidfile $PIDFILE --name lpd
26
# Now we wait for it to die
27
while kill -0 $PID 2>/dev/null; do sleep 1; done
38
echo "Usage: /etc/init.d/lpd {start|stop|restart|force-reload}"