blob: b6650dbb8887f72bba0587957fe09843e91695b4 (
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
33
|
#!/bin/sh
#
# PROVIDE: uptimed
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable uptimed:
#
# uptimed_enable="YES"
#
. /etc/rc.subr
name="uptimed"
rcvar=uptimed_enable
command=%%PREFIX%%/sbin/${name}
stop_postcmd="uptimed_poststop"
uptimed_poststop()
{
rm -f $pidfile
}
load_rc_config ${name}
: ${uptimed_enable="NO"}
: ${uptimed_pidfile="/var/run/${name}.pid"}
pidfile=${uptimed_pidfile}
uptimed_flags="-p ${pidfile}"
run_rc_command "$1"
|