Code

Updated init script
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Jan 2008 14:55:52 +0000 (14:55 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Jan 2008 14:55:52 +0000 (14:55 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8538 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/debian/gosa-si-server.init

index 32ff0c2c840772dea574854bf6d0897c1c9cbfc5..37c30d53497c297ed60e8d95f3d88a70784074b3 100755 (executable)
@@ -57,14 +57,16 @@ stop_server() {
 
 case "$1" in
 start)  log_daemon_msg "Starting GOsa support infrastructure"
-       if [ "$START_BUS" == "1" ]; then
-               log_progress_msg "bus"
-               start_bus
-               log_progress_msg "daemon"
-               start_server
-       else
-               log_progress_msg "daemon"
-               start_server --no-bus
+       if [ -x /usr/sbin/gosa-si-server ]; then
+               if [ "$START_BUS" == "1" ]; then
+                       log_progress_msg "bus"
+                       start_bus
+                       log_progress_msg "daemon"
+                       start_server
+               else
+                       log_progress_msg "daemon"
+                       start_server --no-bus
+               fi
        fi
        if [ "$START_CLIENT" == "1" -a -x /usr/sbin/gosa-si-client ]; then
                log_progress_msg "client"
@@ -73,33 +75,37 @@ start)  log_daemon_msg "Starting GOsa support infrastructure"
         log_end_msg $?
        ;;
 stop)   log_daemon_msg "Stopping GOsa support infrastructure"
-       if [ "$START_BUS" == "1" ]; then
-               log_progress_msg "daemon"
-               stop_server
-               log_progress_msg "bus"
-               stop_bus
-       else
-               log_progress_msg "daemon"
-               stop_server
-       fi
        if [ "$START_CLIENT" == "1" -a -x /usr/sbin/gosa-si-client ]; then
                log_progress_msg "client"
                stop_client
        fi
+       if [ -x /usr/sbin/gosa-si-server ]; then
+               if [ "$START_BUS" == "1" ]; then
+                       log_progress_msg "daemon"
+                       stop_server
+                       log_progress_msg "bus"
+                       stop_bus
+               else
+                       log_progress_msg "daemon"
+                       stop_server
+               fi
+       fi
         log_end_msg $?
         ;;
 reload|force-reload|restart) log_daemon_msg "Restarting GOsa support infrastructure" 
        if [ "$START_CLIENT" == "1" -a -x /usr/sbin/gosa-si-client ]; then
                stop_client
        fi
-       if [ "$START_BUS" == "1" ]; then
-               stop_server
-               stop_bus
-               start_bus
-               start_server --no-bus
-       else
-               stop_server
-               start_server --no-bus
+       if [ -x /usr/sbin/gosa-si-server ]; then
+               if [ "$START_BUS" == "1" ]; then
+                       stop_server
+                       stop_bus
+                       start_bus
+                       start_server --no-bus
+               else
+                       stop_server
+                       start_server --no-bus
+               fi
        fi
        if [ "$START_CLIENT" == "1" -a -x /usr/sbin/gosa-si-client ]; then
                start_client