aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rrdbot/rrdbotd.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-01-15 16:00:59 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-01-15 16:00:59 +0000
commite62eb554b6ab8b056d5902c91ba6d6cc80997435 (patch)
tree1711e8bb2632b7b28e1548f12ee2656585cbaed4 /testing/rrdbot/rrdbotd.initd
parenta2c7615dae18d300e807ebc12c279f88573b0149 (diff)
downloadaports-e62eb554b6ab8b056d5902c91ba6d6cc80997435.tar.bz2
aports-e62eb554b6ab8b056d5902c91ba6d6cc80997435.tar.xz
testing/rrdbot: new aport
an SNMP polling daemon which writes the polled values to an RRD database http://memberwebs.com/stef/software/rrdbot/
Diffstat (limited to 'testing/rrdbot/rrdbotd.initd')
-rw-r--r--testing/rrdbot/rrdbotd.initd28
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/rrdbot/rrdbotd.initd b/testing/rrdbot/rrdbotd.initd
new file mode 100644
index 0000000000..d0fcdc4a6d
--- /dev/null
+++ b/testing/rrdbot/rrdbotd.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+
+name=rrdbotd
+daemon=/usr/sbin/$name
+pidfile=${rrdbotd_pidfile:-/var/run/rrdbotd/rrdbotd.pid}
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting ${name}"
+ start-stop-daemon --start --quiet \
+ --pidfile "$pidfile" \
+ --chuid ${rrdbotd_user:-rrdbotd}:${rrdbotd_group:-rrdbotd} \
+ --exec ${daemon} -- ${rrdbotd_opts} -p "$pidfile"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ start-stop-daemon --stop --quiet \
+ --pidfile "$pidfile" \
+ --exec ${daemon}
+ eend $?
+}
+