summaryrefslogtreecommitdiff
path: root/sysutils/ups-nut/files/upsmon.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/ups-nut/files/upsmon.sh')
-rw-r--r--sysutils/ups-nut/files/upsmon.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/sysutils/ups-nut/files/upsmon.sh b/sysutils/ups-nut/files/upsmon.sh
new file mode 100644
index 00000000000..841f39ec234
--- /dev/null
+++ b/sysutils/ups-nut/files/upsmon.sh
@@ -0,0 +1,26 @@
+#! /bin/sh
+#
+# $NetBSD: upsmon.sh,v 1.1 2001/11/21 15:50:56 jlam Exp $
+#
+# PROVIDE: upsmon
+# REQUIRE: upsd
+
+if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="upsmon"
+rcvar="${name}"
+command="@PREFIX@/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+required_files="@NUT_CONFDIR@/${name}.conf"
+
+if [ ! -d /etc/rc.d ]
+then
+ @ECHO@ -n " ${name}"
+ ${command} ${upsmon_flags} ${command_args}
+else
+ load_rc_config $name
+ run_rc_command "$1"
+fi