]> git.pld-linux.org Git - packages/LPRng.git/blob - lpd.init
6219c8d2402823e4f8d7503527ba97123629db6f
[packages/LPRng.git] / lpd.init
1 #!/bin/sh
2 #
3 # lpd           This shell script takes care of starting and stopping
4 #               lpd (printer daemon).
5 #
6 # chkconfig: 2345 60 60
7 # description: lpd is the print daemon required for lpr to work properly. \
8 #   It is basically a server that arbitrates print jobs to printer(s).
9 # processname: lpd
10 # config: /etc/printcap
11
12 # Source function library.
13 . /etc/rc.d/init.d/functions
14
15 # Source networking configuration.
16 . /etc/sysconfig/network
17
18 # Check that networking is up.
19 [ "${NETWORKING}" = "no" ] && exit 0
20
21 [ -f /usr/sbin/lpd ] || exit 0
22
23 [ -f /etc/printcap ] || exit 0
24
25 # Try get sysconfig ..
26 if [ -f /etc/sysconfig/lpd ]; then
27     . /etc/sysconfig/lpd
28 fi    
29
30 # See how we were called.
31 case "$1" in
32   start)
33         show Starting lpd
34         daemon lpd
35         touch /var/lock/subsys/lpd
36         ;;
37   stop)
38         show Shutting down lpd
39         killproc lpd
40         rm -f /var/lock/subsys/lpd
41         ;;
42   status)
43         status lpd
44         ;;
45   restart|reload)
46         $0 stop
47         $0 start
48         ;;
49   *)
50         echo "Usage: $0 {start|stop|restart|reload|status}"
51         exit 1
52 esac
53
54 exit 0
This page took 0.051104 seconds and 2 git commands to generate.