3 # lpd This shell script takes care of starting and stopping
4 # lpd (printer daemon).
6 # chkconfig: 2345 60 60
8 # description: lpd is the print daemon required for lpr to work properly. \
9 # It is basically a server that arbitrates print jobs to printer(s).
12 # config: /etc/printcap
15 # Source function library
16 . /etc/rc.d/init.d/functions
19 . /etc/sysconfig/network
22 [ -f /etc/sysconfig/lpd ] && . /etc/sysconfig/lpd
24 # Check that networking is up.
25 [ "${NETWORKING}" = "no" ] && echo "Error: Networking is down" && exit 0
28 [ -f /etc/printcap ] || exit 0
31 # See how we were called.
34 # Check if the service is already running?
35 if [ ! -f /var/lock/subsys/lpd ]; then
39 echo "lpd already is running"
41 touch /var/lock/subsys/lpd
44 show "Shutting down lpd"
46 rm -f /var/lock/subsys/lpd
56 echo "Usage: $0 {start|stop|status|restart|reload}"