blob: 8e2bee4637e918d72d8625ceb3b5dfa47d747a49 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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 $*
|