SOURCES: astmanproxy.init (NEW), astmanproxy.sysconfig (NEW) - ini...

jajcus jajcus at pld-linux.org
Mon Jun 19 10:53:08 CEST 2006


Author: jajcus                       Date: Mon Jun 19 08:53:08 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- init script and sysconfig file for astmanproxy

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

---- Diffs:

================================================================
Index: SOURCES/astmanproxy.init
diff -u /dev/null SOURCES/astmanproxy.init:1.1
--- /dev/null	Mon Jun 19 10:53:08 2006
+++ SOURCES/astmanproxy.init	Mon Jun 19 10:53:03 2006
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# astmanproxy	astmanproxy -- Asterisk Manager API Proxy
+#
+# chkconfig:	2345 80 20
+# description:	Startup/shutdown script for Asterisk Manager API Proxy
+# processname:	astmanproxy
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get service config - may override defaults
+[ -f /etc/sysconfig/astmanproxy ] && . /etc/sysconfig/astmanproxy
+
+RETVAL=0
+case "$1" in
+  start)
+	if [ ! -f /var/lock/subsys/astmanproxy ]; then
+		msg_starting astmanproxy
+		daemon /usr/sbin/astmanproxy
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/astmanproxy
+	else
+		msg_already_running astmanproxy
+	fi
+	;;
+  stop)
+	if [ -f /var/lock/subsys/astmanproxy ]; then
+		msg_stopping astmanproxy
+		killproc astmanproxy
+		rm -f /var/lock/subsys/astmanproxy >/dev/null 2>&1
+	else
+		msg_not_running astmanproxy
+	fi
+	;;
+  restart)
+	$0 stop
+	$0 start
+	exit $?
+	;;
+  status)
+	status astmanproxy
+	exit $?
+	;;
+  *)
+	msg_usage "$0 {start|stop|restart|status}"
+	exit 3
+esac
+
+exit $RETVAL

================================================================
Index: SOURCES/astmanproxy.sysconfig
diff -u /dev/null SOURCES/astmanproxy.sysconfig:1.1
--- /dev/null	Mon Jun 19 10:53:08 2006
+++ SOURCES/astmanproxy.sysconfig	Mon Jun 19 10:53:03 2006
@@ -0,0 +1,3 @@
+# Nice level for astmanproxy
+SERVICE_RUN_NICE_LEVEL="+0"
+
================================================================


More information about the pld-cvs-commit mailing list