[Pkg-sks-commit] r45 - sks/trunk/sks/debian

chrism at alioth.debian.org chrism at alioth.debian.org
Thu Jun 19 14:41:11 UTC 2008


Author: chrism
Date: 2008-06-19 14:41:11 +0000 (Thu, 19 Jun 2008)
New Revision: 45

Added:
   sks/trunk/sks/debian/default
   sks/trunk/sks/debian/init
Modified:
   sks/trunk/sks/debian/postrm
   sks/trunk/sks/debian/rules
Log:
[project @ 46]
init script

Original author: fabbione
Date: 2003-12-04 10:00:07.817309+00:00

Added: sks/trunk/sks/debian/default
===================================================================
--- sks/trunk/sks/debian/default	                        (rev 0)
+++ sks/trunk/sks/debian/default	2008-06-19 14:41:11 UTC (rev 45)
@@ -0,0 +1,2 @@
+# by default we do NOT start sks!
+initstart=no

Added: sks/trunk/sks/debian/init
===================================================================
--- sks/trunk/sks/debian/init	                        (rev 0)
+++ sks/trunk/sks/debian/init	2008-06-19 14:41:11 UTC (rev 45)
@@ -0,0 +1,78 @@
+#!/bin/sh -e
+#
+# Start/stops the sks daemons.
+#
+#
+
+# Reads config file
+[ -r /etc/default/sks ] && . /etc/default/sks
+
+DAEMON=/usr/bin/sks
+SKSDBPID=/var/run/sks/sksdb.pid
+SKSREPID=/var/run/sks/sksre.pid
+
+# See if the daemon is there
+
+if [ ! -x $DAEMON ]; then
+    echo "ERROR: $DAEMON either is not there or is not executable"
+    exit 1
+fi
+
+case "$1" in
+    start)
+	echo -n "Starting sks daemons:"
+
+	if [ "$initstart" = "no" ]; then
+	    echo "Not starting sks as requested"
+	    exit 0
+	fi
+
+	echo -n " sksdb"
+
+	start-stop-daemon --start --quiet --oknodo \
+			  --chuid debian-sks:nogroup \
+			  --background \
+			  --make-pidfile \
+			  --pidfile $SKSDBPID \
+			  --exec $DAEMON -- db
+
+	echo -n " sksrecon"
+
+	start-stop-daemon --start --quiet --oknodo \
+			  --chuid debian-sks:nogroup \
+			  --background \
+			  --make-pidfile \
+			  --pidfile $SKSREPID \
+			  --exec $DAEMON -- recon
+
+	echo " done."
+
+    ;;
+    stop)
+	echo -n "Stopping sks daemons:"
+
+	echo -n " sksrecon"
+
+	start-stop-daemon --stop --quiet --oknodo --pidfile $SKSREPID
+
+	echo -n " sksdb"
+
+	start-stop-daemon --stop --quiet --oknodo --pidfile $SKSDBPID
+
+	rm -f $SKSREPID $SKSDBPID
+
+	echo " done."
+
+    ;;
+    reload|restart|force-reload)
+	$0 stop
+	sleep 1
+	$0 start
+    ;;
+    *)
+	echo "Usage: $0 {start|stop|reload|restart|force-reload}"
+	exit 1
+    ;;
+esac
+
+exit 0


Property changes on: sks/trunk/sks/debian/init
___________________________________________________________________
Name: svn:executable
   + *

Modified: sks/trunk/sks/debian/postrm
===================================================================
--- sks/trunk/sks/debian/postrm	2008-06-19 14:40:46 UTC (rev 44)
+++ sks/trunk/sks/debian/postrm	2008-06-19 14:41:11 UTC (rev 45)
@@ -6,4 +6,6 @@
     rm -rf /var/log/sks
 fi
 
+#DEBHELPER#
+
 exit 0

Modified: sks/trunk/sks/debian/rules
===================================================================
--- sks/trunk/sks/debian/rules	2008-06-19 14:40:46 UTC (rev 44)
+++ sks/trunk/sks/debian/rules	2008-06-19 14:41:11 UTC (rev 45)
@@ -48,6 +48,7 @@
 	dh_strip
 	dh_shlibdeps
 	dh_installdebconf
+	dh_installinit -- defaults 92
 	dh_installdeb
 	dh_gencontrol
 	dh_md5sums




More information about the Pkg-sks-commit mailing list