SOURCES: cacti-cactid.init (NEW), cacti-cactid.sysconfig (NEW) - new

arekm arekm at pld-linux.org
Tue Oct 11 12:55:55 CEST 2005


Author: arekm                        Date: Tue Oct 11 10:55:55 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new

---- Files affected:
SOURCES:
   cacti-cactid.init (NONE -> 1.1)  (NEW), cacti-cactid.sysconfig (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/cacti-cactid.init
diff -u /dev/null SOURCES/cacti-cactid.init:1.1
--- /dev/null	Tue Oct 11 12:55:55 2005
+++ SOURCES/cacti-cactid.init	Tue Oct 11 12:55:50 2005
@@ -0,0 +1,76 @@
+#!/bin/sh
+#
+# cactid	cactid
+#
+# chkconfig:	345 55 45
+#
+# description:	cactid - data gathering daemon for cacti
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/cactid ] && . /etc/sysconfig/cactid
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+	if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status -a "$1" != init ]; then
+		msg_network_down cactid
+		exit 1
+	fi
+else
+	exit 0
+fi
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+	# Check if the service is already running?
+	if [ ! -f /var/lock/subsys/cactid ]; then
+		msg_starting cactid
+		daemon /usr/sbin/cactid
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/cactid
+	else
+		msg_already_running cactid
+	fi
+	;;
+  stop)
+	if [ -f /var/lock/subsys/cactid ]; then
+		msg_stopping cactid
+		killproc cactid -TERM
+		rm -f /var/lock/subsys/cactid >/dev/null 2>&1
+	else
+		msg_not_running cactid
+	fi
+	;;
+  restart)
+	$0 stop
+	$0 start
+	exit $?
+	;;
+  status)
+	status cactid
+	exit $?
+	;;
+  reload|force-reload)
+	if [ -f /var/lock/subsys/cactid ]; then
+		msg_reloading cactid
+		killproc cactid -HUP
+		RETVAL=$?
+	else
+		msg_not_running cactid >&2
+		exit 7
+	fi
+	;;
+  *)
+	msg_usage "$0 {start|stop|init|restart|reload|force-reload|status}"
+	exit 3
+esac
+
+exit $RETVAL

================================================================
Index: SOURCES/cacti-cactid.sysconfig
diff -u /dev/null SOURCES/cacti-cactid.sysconfig:1.1
--- /dev/null	Tue Oct 11 12:55:55 2005
+++ SOURCES/cacti-cactid.sysconfig	Tue Oct 11 12:55:50 2005
@@ -0,0 +1,5 @@
+# Customized setings
+
+# Define nice level
+SERVICE_RUN_NICE_LEVEL="+5"
+
================================================================



More information about the pld-cvs-commit mailing list