#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Copyright 2019 Hyperbola Project
# Distributed under the terms of the GNU General Public License, v2 or later

description="The Common Unix Printing System service"
command="/usr/sbin/cupsd"

depend() {
	use net
	before nfs
	after logger
}

start_pre() {
	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 daemon:sys /run/cups/certs
}
