init script: handle ganeti-confd as well
authorGuido Trotter <ultrotter@google.com>
Mon, 3 Aug 2009 17:13:44 +0000 (18:13 +0100)
committerGuido Trotter <ultrotter@google.com>
Mon, 10 Aug 2009 15:12:39 +0000 (16:12 +0100)
Adding ganeti-confd to the example init script. The daemon itself will
only start on master candidates, but the init script can just try to
start it on all nodes.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

doc/examples/ganeti.initd.in

index d09ac73..cb56cb4 100644 (file)
@@ -28,6 +28,11 @@ MASTERD="@PREFIX@/sbin/${MASTERD_NAME}"
 MASTERD_PID="${GANETIRUNDIR}/${MASTERD_NAME}.pid"
 MASTERD_ARGS=""
 
+CONFD_NAME="ganeti-confd"
+CONFD="@PREFIX@/sbin/${CONFD_NAME}"
+CONFD_PID="${GANETIRUNDIR}/${CONFD_NAME}.pid"
+CONFD_ARGS=""
+
 RAPI_NAME="ganeti-rapi"
 RAPI="@PREFIX@/sbin/${RAPI_NAME}"
 RAPI_PID="${GANETIRUNDIR}/${RAPI_NAME}.pid"
@@ -95,22 +100,26 @@ case "$1" in
         check_config
         start_action $NODED $NODED_PID $NODED_ARGS
         start_action $MASTERD $MASTERD_PID $MASTERD_ARGS
+        start_action $CONFD $CONFD_PID $CONFD_ARGS
         start_action $RAPI $RAPI_PID $RAPI_ARGS
         ;;
     stop)
         log_daemon_msg "Stopping $DESC" "$NAME"
         stop_action $RAPI $RAPI_PID
         stop_action $MASTERD $MASTERD_PID
+        stop_action $CONFD $CONFD_PID
         stop_action $NODED $NODED_PID
         ;;
     restart|force-reload)
         log_daemon_msg "Reloading $DESC"
         stop_action $RAPI $RAPI_PID
         stop_action $MASTERD $MASTERD_PID
+        stop_action $CONFD $CONFD_PID
         stop_action $NODED $NODED_PID
         check_config
         start_action $NODED $NODED_PID $NODED_ARGS
         start_action $MASTERD $MASTERD_PID $MASTERD_ARGS
+        start_action $CONFD $CONFD_PID $CONFD_ARGS
         start_action $RAPI $RAPI_PID $RAPI_ARGS
         ;;
     *)