blob: b24681234b8c59fef5698d6e4e9e72079c41cb78 (
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
|
#!/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 $*
|