freebsd-ports/print/hplip3/files/hpiod.sh.in

31 lines
454 B
Bash

#!/bin/sh
# PROVIDE: hpiod
# REQUIRE: NETWORKING
# KEYWORD: shutdown
. %%RC_SUBR%%
name=hpiod
rcvar=${name}_enable
command="%%PREFIX%%/sbin/${name}"
pidfile="/var/run/${name}.pid"
portfile="/var/run/${name}.port"
hpiod_user=hplip
start_precmd="hpiod_prestart"
load_rc_config $name
: ${hpiod_enable="NO"}
hpiod_prestart()
{
touch ${pidfile}
touch ${portfile}
chown ${hpiod_user} ${pidfile}
chown ${hpiod_user} ${portfile}
}
run_rc_command $*