1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-17 03:25:46 +00:00
freebsd-ports/print/hplip3/files/hpssd.sh.in

35 lines
537 B
Bash

#!/bin/sh
# PROVIDE: hpssd
# REQUIRE: hpiod
# BEFORE: cupsd
# KEYWORD: shutdown
. %%RC_SUBR%%
name=hpssd
rcvar=${name}_enable
command="%%PREFIX%%/sbin/${name}"
command_interpreter="%%PREFIX%%/bin/python"
pidfile="/var/run/${name}.pid"
portfile="/var/run/${name}.port"
hpssd_user=nobody
command_args=">/dev/null"
start_precmd="hpssd_prestart"
load_rc_config $name
: ${hpssd_enable="NO"}
hpssd_prestart()
{
touch ${pidfile}
touch ${portfile}
chown ${hpssd_user} ${pidfile}
chown ${hpssd_user} ${portfile}
}
run_rc_command $*