[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r4135 - trunk/OpenDNSSEC/tools

Matthijs Mekking matthijs at nlnetlabs.nl
Mon Oct 25 12:09:42 CEST 2010


Author: matthijs
Date: 2010-10-25 12:09:42 +0200 (Mon, 25 Oct 2010)
New Revision: 4135

Modified:
   trunk/OpenDNSSEC/tools/ods-control.in
Log:
use ods-signer running on start up (ticket 187)



Modified: trunk/OpenDNSSEC/tools/ods-control.in
===================================================================
--- trunk/OpenDNSSEC/tools/ods-control.in	2010-10-25 10:09:08 UTC (rev 4134)
+++ trunk/OpenDNSSEC/tools/ods-control.in	2010-10-25 10:09:42 UTC (rev 4135)
@@ -31,6 +31,7 @@
 bindir="@OPENDNSSEC_BIN_DIR@"
 sbindir="@OPENDNSSEC_SBIN_DIR@"
 enforcer_pid_file="@OPENDNSSEC_PID_DIR@/enforcerd.pid"
+signer_pid_file="@OPENDNSSEC_PID_DIR@/signerd.pid"
 
 
 case "$1" in
@@ -46,8 +47,32 @@
 	;;
 
 'signer')
-	shift
-	"$sbindir/ods-signer" $@
+	case "$2" in
+
+	'start')
+		echo "Starting signer..."
+		"$sbindir/ods-signer" start
+		i=0
+		while [ ! -r "$signer_pid_file" ]; do
+			sleep 1
+			i=$(( $i + 1 ))
+			if [ $i -ge 5 ]; then
+				RETVAL=1
+				echo "Could not start signer"
+				exit $RETVAL
+			fi
+		done
+
+		"$sbindir/ods-signer" running
+		RETVAL=$?
+
+		exit $RETVAL
+		;;
+	*)
+		"$sbindir/ods-signer" $2
+		;;
+
+	esac
 	;;
 
 'enforcer')
@@ -117,7 +142,8 @@
 	"$0" enforcer start
 
 	echo "Starting signer engine..."
-	"$sbindir/ods-signer" start
+	"$0" signer start
+
 	;;
 
 'stop')
@@ -126,7 +152,7 @@
 	echo "Stopping signer engine.."
 	"$sbindir/ods-signer" stop
 	;;
-	
+
 *)
 	echo "usage: $progname ksm|hsm|signer|enforcer|start|stop ..."
 	;;




More information about the Opendnssec-commits mailing list