summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Russell Reese III <anti@gentoo.org>2004-05-30 00:05:17 +0000
committerRay Russell Reese III <anti@gentoo.org>2004-05-30 00:05:17 +0000
commitfb2083f20820bb58cc09e82baa26825becb8a988 (patch)
tree03f6143678f103cb5185af06fc9831004698e3e3 /net-analyzer/rtg/files
parentfix bug #52387. cleanup some use stuff. (diff)
downloadhistorical-fb2083f20820bb58cc09e82baa26825becb8a988.tar.gz
historical-fb2083f20820bb58cc09e82baa26825becb8a988.tar.bz2
historical-fb2083f20820bb58cc09e82baa26825becb8a988.zip
Added new init.d script
Diffstat (limited to 'net-analyzer/rtg/files')
-rw-r--r--net-analyzer/rtg/files/digest-rtg-0.7.4-r11
-rw-r--r--net-analyzer/rtg/files/rtgpoll.confd9
-rw-r--r--net-analyzer/rtg/files/rtgpoll.initd49
3 files changed, 59 insertions, 0 deletions
diff --git a/net-analyzer/rtg/files/digest-rtg-0.7.4-r1 b/net-analyzer/rtg/files/digest-rtg-0.7.4-r1
new file mode 100644
index 000000000000..fd1fc2b8a83e
--- /dev/null
+++ b/net-analyzer/rtg/files/digest-rtg-0.7.4-r1
@@ -0,0 +1 @@
+MD5 c61ff1323701e2771bb5ff9cf67f1b77 rtg-0.7.4.tar.gz 710621
diff --git a/net-analyzer/rtg/files/rtgpoll.confd b/net-analyzer/rtg/files/rtgpoll.confd
new file mode 100644
index 000000000000..0ef172060796
--- /dev/null
+++ b/net-analyzer/rtg/files/rtgpoll.confd
@@ -0,0 +1,9 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/rtg/files/rtgpoll.confd,v 1.1 2004/05/30 00:05:17 anti Exp $
+
+# RTGPOLL_TARGETS defines the targets file to run the poller on. The default
+# should be fine.
+
+RTGPOLL_TARGETS=/etc/rtg/targets.cfg
+
diff --git a/net-analyzer/rtg/files/rtgpoll.initd b/net-analyzer/rtg/files/rtgpoll.initd
new file mode 100644
index 000000000000..8f76af1653f6
--- /dev/null
+++ b/net-analyzer/rtg/files/rtgpoll.initd
@@ -0,0 +1,49 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/rtg/files/rtgpoll.initd,v 1.1 2004/05/30 00:05:17 anti Exp $
+
+[ -z "${RTGPOLL_TARGETS}" ] && RTGPOLL_TARGETS=/etc/rtg/targets.cfg
+
+opts="${opts} reload"
+
+depend() {
+ need net mysql
+}
+
+checkconfig() {
+ if [ ! -e /etc/rtg/rtg.conf ] ; then
+ eerror "You need an /etc/rtg/rtg.conf config file to run rtgpoll"
+ return 1
+ fi
+
+ if [ ! -e "${RTGPOLL_TARGETS}" ] ; then
+ eerror "${RTGPOLL_TARGETS} doesn't exist, you must have a targets configuration to run rtgpoll"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting rtgpoll"
+ start-stop-daemon --start --background --quiet --pidfile /var/run/rtgpoll.pid --exec /usr/bin/rtgpoll -- -t ${RTGPOLL_TARGETS}
+ eend $?
+}
+
+reload() {
+ if [ ! -f /var/run/rtgpoll.pid ]; then
+ eerror "rtgpoll isn't running"
+ return 1
+ fi
+ ebegin "Reloading configuration"
+ kill -HUP `cat /var/run/rtgpoll.pid` &>/dev/null
+ eend $?
+}
+
+
+stop() {
+ ebegin "Stopping rtgpoll"
+ start-stop-daemon --stop --quiet --signal 9 --name rtgpoll --pidfile /var/run/rtgpoll.pid
+ eend $?
+}
+