]> git.pld-linux.org Git - packages/LPRng.git/blame - lpd.init
- added using CVS keywords in %changelog (for automating them).
[packages/LPRng.git] / lpd.init
CommitLineData
1251c2e5 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 ..
26if [ -f /etc/sysconfig/lpd ]; then
27 . /etc/sysconfig/lpd
28fi
29
30# See how we were called.
31case "$1" in
32 start)
d5e2590a 33 show "Starting lpd"
1251c2e5 34 daemon lpd
35 touch /var/lock/subsys/lpd
36 ;;
37 stop)
d5e2590a 38 show "Shutting down lpd"
1251c2e5 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
52esac
53
54exit 0
This page took 0.038731 seconds and 4 git commands to generate.