summaryrefslogtreecommitdiff
path: root/sysutils/nut22/files/nut_upsmon.in
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2012-08-05 23:19:36 +0000
committerDoug Barton <dougb@FreeBSD.org>2012-08-05 23:19:36 +0000
commit9aac569eaa031e27191a3f4165b389a17f467ad2 (patch)
tree1ed78841e1757014ccc09581c61c3683992d3f77 /sysutils/nut22/files/nut_upsmon.in
parentWhen installing in the base, USE_RCORDER does the right thing without (diff)
Move the rc.d scripts of the form *.sh.in to *.in
Where necessary add $FreeBSD$ to the file No PORTREVISION bump necessary because this is a no-op
Diffstat (limited to 'sysutils/nut22/files/nut_upsmon.in')
-rw-r--r--sysutils/nut22/files/nut_upsmon.in34
1 files changed, 34 insertions, 0 deletions
diff --git a/sysutils/nut22/files/nut_upsmon.in b/sysutils/nut22/files/nut_upsmon.in
new file mode 100644
index 000000000000..2470e766f186
--- /dev/null
+++ b/sysutils/nut22/files/nut_upsmon.in
@@ -0,0 +1,34 @@
+#!/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=nut_upsmon_enable
+
+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"}
+
+run_rc_command "$1"