summaryrefslogtreecommitdiff
path: root/pcr/openrc-misc/cupsd.init.d-r1
blob: 2f2e9e2df1926c9bf31a4635e3ae9c7b5c7f9598 (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
#!/sbin/runscript

depend() {
	use net
	@neededservices@
	before nfs
	after logger
}

start() {
	ebegin "Starting cupsd"

	checkpath -q -d -m 0775 -o root:lp /var/cache/cups
	checkpath -q -d -m 0775 -o root:lp /var/cache/cups/rss
	checkpath -q -d -m 0755 -o root:lp /run/cups
	checkpath -q -d -m 0511 -o lp:lpadmin /run/cups/certs

	start-stop-daemon --start --quiet --exec /usr/sbin/cupsd
	eend $?
}

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