blob: e1836ac174c1041427ece7fc9a7a6f3a9e1e38df (
plain)
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
34
35
36
37
38
39
40
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: nut_upsmon
# REQUIRE: NETWORKING nut
# BEFORE: LOGIN
# KEYWORD: shutdown
# Define these nut_upsmon* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/nut_upsmon
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
nut_upsmon_enable=${nut_upsmon_enable-"NO"}
nut_upsmon_prefix=${nut_upsmon_prefix-"%%PREFIX%%"}
. /etc/rc.subr
name="nut_upsmon"
rcvar=`set_rcvar`
load_rc_config $name
required_dirs="%%STATEDIR%%"
required_files="${nut_upsmon_prefix}/etc/nut/upsmon.conf"
command="${nut_upsmon_prefix}/sbin/upsmon"
pidfile="%%STATEDIR%%/upsmon.pid"
nut_upsmon_flags=${nut_upsmon_flags-"localhost"}
extra_commands=reload
reload()
{
${command} -c reload
}
run_rc_command "$1"
|