summaryrefslogtreecommitdiff
path: root/print/hplip3/files/hpssd.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'print/hplip3/files/hpssd.sh.in')
-rw-r--r--print/hplip3/files/hpssd.sh.in17
1 files changed, 8 insertions, 9 deletions
diff --git a/print/hplip3/files/hpssd.sh.in b/print/hplip3/files/hpssd.sh.in
index 4e7dc15f11b0..3b0303e7afe9 100644
--- a/print/hplip3/files/hpssd.sh.in
+++ b/print/hplip3/files/hpssd.sh.in
@@ -3,27 +3,26 @@
# PROVIDE: hpssd
# REQUIRE: hpiod
# BEFORE: cupsd
-# KEYWORD: FreeBSD shutdown
-
-[ -z "${hpssd_enable}" ] && hpssd_enable="NO"
+# KEYWORD: shutdown
. /etc/rc.subr
-prefix=%%PREFIX%%
-
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="${prefix}/sbin/${name}"
-command_interpreter="$prefix/bin/python"
command_args=">/dev/null"
-start_precmd="hpssd_prestart"
-rcvar=`set_rcvar`
+start_precmd="hpssd_prestart"
load_rc_config $name
+: ${hpssd_enable="NO"}
+
hpssd_prestart()
{
touch ${pidfile}