summaryrefslogtreecommitdiff
path: root/parallel/ganglia-monitor-core/files/gmetad.in
diff options
context:
space:
mode:
Diffstat (limited to 'parallel/ganglia-monitor-core/files/gmetad.in')
-rw-r--r--parallel/ganglia-monitor-core/files/gmetad.in45
1 files changed, 45 insertions, 0 deletions
diff --git a/parallel/ganglia-monitor-core/files/gmetad.in b/parallel/ganglia-monitor-core/files/gmetad.in
new file mode 100644
index 00000000000..acf02457583
--- /dev/null
+++ b/parallel/ganglia-monitor-core/files/gmetad.in
@@ -0,0 +1,45 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: gmetad.in,v 1.1.1.1 2005/02/07 14:33:22 jschauma Exp $
+#
+# PROVIDE: gmetad
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# You will need to set some variables in /etc/rc.conf to start gmetad:
+#
+# gmetad=YES
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="gmetad"
+rcvar=$name
+command="@PREFIX@/sbin/gmetad"
+required_files="@PKG_SYSCONFDIR@/gmetad.conf"
+start_cmd="gmetad_start"
+stop_cmd="gmetad_stop"
+restart_cmd="gmetad_stop ; gmetad_start"
+
+gmetad_start ()
+{
+ # gmetad/process_xml.c 1060 re-releases a lock, claiming it's
+ # ``required under certain errors''
+ export PTHREAD_DIAGASSERT=A
+ ${command}
+}
+
+gmetad_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