diff options
Diffstat (limited to 'print/hplip3/files/hpiod.sh.in')
-rw-r--r-- | print/hplip3/files/hpiod.sh.in | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/print/hplip3/files/hpiod.sh.in b/print/hplip3/files/hpiod.sh.in new file mode 100644 index 000000000000..8e2bee4637e9 --- /dev/null +++ b/print/hplip3/files/hpiod.sh.in @@ -0,0 +1,32 @@ +#!/bin/sh + +# PROVIDE: hpiod +# REQUIRE: NETWORKING +# KEYWORD: FreeBSD shutdown + +[ -z "${hpiod_enable}" ] && hpiod_enable="NO" + +. /etc/rc.subr + +prefix=%%PREFIX%% + +name=hpiod +pidfile="/var/run/${name}.pid" +portfile="/var/run/${name}.port" +hpiod_user=hplip +command="${prefix}/sbin/${name}" +start_precmd="hpiod_prestart" + +rcvar=`set_rcvar` + +load_rc_config $name + +hpiod_prestart() +{ + touch ${pidfile} + touch ${portfile} + chown ${hpiod_user} ${pidfile} + chown ${hpiod_user} ${portfile} +} + +run_rc_command $* |