Author: justi9
Date: 2008-11-26 15:26:37 -0500 (Wed, 26 Nov 2008)
New Revision: 2890
Added:
mgmt/trunk/sesame/cpp/etc/sysvinit-sesame
Log:
Add an init script for sesame
Added: mgmt/trunk/sesame/cpp/etc/sysvinit-sesame
===================================================================
--- mgmt/trunk/sesame/cpp/etc/sysvinit-sesame (rev 0)
+++ mgmt/trunk/sesame/cpp/etc/sysvinit-sesame 2008-11-26 20:26:37 UTC (rev 2890)
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# sesame: Sesame daemon
+# processname: sesame
+# pidfile: /var/run/sesame.pid
+#
+
+# Sanity checks.
+[ -x /usr/bin/sesame ] || exit 0
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# so we can rearrange this easily
+processname=sesame
+servicename=sesame
+
+RETVAL=0
+
+start() {
+ echo -n $"Starting Sesame daemon: "
+ daemon --check $servicename $processname \&
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename
+}
+
+stop() {
+ echo -n $"Stopping Sesame daemon: "
+
+ killproc $servicename -TERM
+ RETVAL=$?
+ echo
+ if [ $RETVAL -eq 0 ]; then
+ rm -f /var/lock/subsys/$servicename
+ rm -f /var/run/sesame.pid
+ fi
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status $processname
+ RETVAL=$?
+ ;;
+ restart)
+ stop
+ sleep 3
+ start
+ ;;
+ condrestart)
+ if [ -f /var/lock/subsys/$servicename ]; then
+ stop
+ sleep 3
+ start
+ fi
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart}"
+ ;;
+esac
+exit $RETVAL
Property changes on: mgmt/trunk/sesame/cpp/etc/sysvinit-sesame
___________________________________________________________________
Name: svn:executable
+ *
Show replies by date