summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2002-08-04 03:15:52 +0000
committerDonny Davies <woodchip@gentoo.org>2002-08-04 03:15:52 +0000
commit4b806327eaebde43a47da4d0ea3e672031a5bbe6 (patch)
tree808a4fbd4bcc11f0c6f071d37fe56495f17231df /net-misc/nut
parentSmall correction for the dodoc section (diff)
downloadgentoo-2-4b806327eaebde43a47da4d0ea3e672031a5bbe6.tar.gz
gentoo-2-4b806327eaebde43a47da4d0ea3e672031a5bbe6.tar.bz2
gentoo-2-4b806327eaebde43a47da4d0ea3e672031a5bbe6.zip
doh
Diffstat (limited to 'net-misc/nut')
-rw-r--r--net-misc/nut/files/upsd-init25
-rw-r--r--net-misc/nut/files/upsmon-init20
2 files changed, 45 insertions, 0 deletions
diff --git a/net-misc/nut/files/upsd-init b/net-misc/nut/files/upsd-init
new file mode 100644
index 000000000000..1fc3d3287ce0
--- /dev/null
+++ b/net-misc/nut/files/upsd-init
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/files/upsd-init,v 1.1 2002/08/04 03:15:52 woodchip Exp $
+
+depend() {
+ need net
+ before upsmon
+}
+
+start() {
+ ebegin "Starting upsd"
+ /sbin/upsdrvctl start
+ start-stop-daemon --start --quiet --startas /usr/sbin/upsd \
+ --pidfile=/var/state/nut/upsd.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping upsd"
+ start-stop-daemon --stop --quiet --pidfile=/var/state/nut/upsd.pid
+ rc=$?
+ /sbin/upsdrvctl stop
+ eend $rc
+}
diff --git a/net-misc/nut/files/upsmon-init b/net-misc/nut/files/upsmon-init
new file mode 100644
index 000000000000..7023f4cc9b62
--- /dev/null
+++ b/net-misc/nut/files/upsmon-init
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/files/upsmon-init,v 1.1 2002/08/04 03:15:52 woodchip Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting upsmon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/upsmon
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping upsmon"
+ start-stop-daemon --stop --quiet --pidfile=/var/run/upsmon.pid
+ eend $?
+}