summaryrefslogtreecommitdiff
blob: a20bc3eeaf51069914dc527d3687144b3c391031 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/sbin/runscript

depend() {
	need net
}

checkconfig() {
	if [ ! -e /etc/lprng/lpd.conf ] ; then
		eerror "You need an /etc/lprng/lpd.conf file first"
		eerror "There is a sample in  /usr/share/doc/LPRng"
		return 1
	fi
	if [ ! -e /etc/lprng/printcap ] ; then
		eerror "You need an /etc/lprng/printcap file first"
		eerror "There is a sample in  /usr/share/doc/LPRng"
		return 1
	fi
	if [ ! -e /etc/lprng/lpd.perms ] ; then
		eerror "You need an /etc/lprng/lpd.perms file first"
		eerror "There is  a sample in  /usr/share/doc/LPRng"
		return 1
	fi
}

start() {
	checkconfig || return 1
	ebegin "Starting lpd"
	start-stop-daemon --start --quiet --exec /usr/sbin/lpd
	eend $?
}

stop() {
	ebegin "Stopping lpd"
	start-stop-daemon --stop --quiet --exec /usr/sbin/lpd
	eend $?
}