freebsd-ports/sysutils/LPRng/files/lprng.in
John Marino 2deb13d2f5 sysutils/LPRng: Fix rc script path locations
PR:		192693
Proposed fix:	papowell (astart.com)
Final fix:	Adam McDougall
2014-08-16 19:35:10 +00:00

38 lines
619 B
Bash

#!/bin/sh
# PROVIDE: lprng
# REQUIRE: LOGIN
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# lprng_enable (bool): Set to NO by default.
# Set it to YES to enable lprng.
#
. /etc/rc.subr
name="lprng"
rcvar=lprng_enable
command=%%PREFIX%%/sbin/lpd
required_files="/etc/printcap %%PREFIX%%/etc/lpd.conf %%PREFIX%%/etc/lpd.perms"
start_precmd=start_precmd
start_precmd()
{
if checkyesno lpd_enable; then
warn "lpd must be disabled"
return 1
fi
%%PREFIX%%/sbin/checkpc -f
}
load_rc_config $name
: ${lprng_enable="NO"}
run_rc_command "$1"