SOURCES: bandersnatch.init (NEW), bandersnatch.sysconfig (NEW) - new

arekm arekm at pld-linux.org
Wed Sep 21 10:05:56 CEST 2005


Author: arekm                        Date: Wed Sep 21 08:05:56 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new

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

---- Diffs:

================================================================
Index: SOURCES/bandersnatch.init
diff -u /dev/null SOURCES/bandersnatch.init:1.1
--- /dev/null	Wed Sep 21 10:05:56 2005
+++ SOURCES/bandersnatch.init	Wed Sep 21 10:05:51 2005
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# bandersnatch	Logs jabber conversations
+#
+# chkconfig:	345 99 01
+# description:	bandersnatch is a jabber logger
+#		
+# processname:	bandersnatch
+# config:	
+# pidfile:
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+. /etc/sysconfig/bandersnatch
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+	if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+		msg_network_down bandersnatch
+		exit 1
+	fi
+else
+	exit 0
+fi
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+	# Start daemons.
+	if [ ! -f /var/lock/subsys/bandersnatch ]; then
+		msg_starting bandersnatch
+		daemon bandersnatch /etc/bandersnatch/bandersnatch.xml
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bandersnatch
+	else
+		msg_already_running bandersnatch
+	fi
+	;;
+  stop)
+	# Stop daemons.
+	if [ -f /var/lock/subsys/bandersnatch ]; then
+		msg_stopping bandersnatch
+		killproc bandersnatch
+		rm -f /var/lock/subsys/bandersnatch >/dev/null 2>&1
+	else
+		msg_not_running bandersnatch
+	fi	
+	;;
+  restart|force-reload)
+	$0 stop
+	$0 start
+	exit $?
+	;;
+  status)
+	status bandersnatch
+	exit $?
+	;;
+  *)
+	msg_usage "$0 {start|stop|restart|force-reload|status}"
+	exit 3
+esac
+
+exit $RETVAL

================================================================
Index: SOURCES/bandersnatch.sysconfig
diff -u /dev/null SOURCES/bandersnatch.sysconfig:1.1
--- /dev/null	Wed Sep 21 10:05:56 2005
+++ SOURCES/bandersnatch.sysconfig	Wed Sep 21 10:05:51 2005
@@ -0,0 +1,2 @@
+# Nice level
+SERVICE_RUN_NICE_LEVEL="+5"
================================================================



More information about the pld-cvs-commit mailing list