summaryrefslogtreecommitdiff
path: root/parallel/ganglia-monitor-core/files/gmond.in
diff options
context:
space:
mode:
Diffstat (limited to 'parallel/ganglia-monitor-core/files/gmond.in')
-rw-r--r--parallel/ganglia-monitor-core/files/gmond.in42
1 files changed, 42 insertions, 0 deletions
diff --git a/parallel/ganglia-monitor-core/files/gmond.in b/parallel/ganglia-monitor-core/files/gmond.in
new file mode 100644
index 00000000000..978173c74bd
--- /dev/null
+++ b/parallel/ganglia-monitor-core/files/gmond.in
@@ -0,0 +1,42 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: gmond.in,v 1.1.1.1 2005/02/07 14:33:22 jschauma Exp $
+#
+# PROVIDE: gmond
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# You will need to set some variables in /etc/rc.conf to start gmond:
+#
+# gmond=YES
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="gmond"
+rcvar=$name
+command="@PREFIX@/sbin/gmond"
+required_files="@PKG_SYSCONFDIR@/gmond.conf"
+start_cmd="gmond_start"
+stop_cmd="gmond_stop"
+restart_cmd="gmond_stop ; gmond_start"
+
+gmond_start ()
+{
+ ${command}
+}
+
+gmond_stop()
+{
+ pkill ${name} 2>/dev/null
+}
+
+if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]
+then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ eval ${start_cmd}
+fi