Code

Updated debian infrastructure
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Jan 2008 14:43:57 +0000 (14:43 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Jan 2008 14:43:57 +0000 (14:43 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8537 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 10df929a094383f86948d8947d8b1c2bbf7c40e4..74a48930b72dbcd3a444259bed2274ae6c8495ac 100644 (file)
@@ -1,2 +1,3 @@
 # /etc/default/gosa-si - configure the init script
 START_BUS=0
+START_CLIENT=1
index 18e68aefcfa4280e6f61dfcba1456a82d92ff4f5..32ff0c2c840772dea574854bf6d0897c1c9cbfc5 100755 (executable)
@@ -25,13 +25,23 @@ START_BUS=0
 . /lib/lsb/init-functions
 
 
+start_client() {
+       start-stop-daemon --start --quiet --pidfile /var/run/gosa-si-client.pid --name gosa-si-client --startas /usr/sbin/gosa-si-client
+}
+
+
 start_bus() {
-       start-stop-daemon --start --quiet --pidfile /var/run/gosa-si-bus.pid --name gosa-si-bus --startas /usr/sbin/gosa-si-bus -- 
+       start-stop-daemon --start --quiet --pidfile /var/run/gosa-si-bus.pid --name gosa-si-bus --startas /usr/sbin/gosa-si-bus
 }
 
 
 start_server() {
-       start-stop-daemon --start --quiet --pidfile /var/run/gosa-si-server.pid --name gosa-si-server --startas /usr/sbin/gosa-si-server -- -vvvvv $1
+       start-stop-daemon --start --quiet --pidfile /var/run/gosa-si-server.pid --name gosa-si-server --startas /usr/sbin/gosa-si-server -- $1
+}
+
+
+stop_client() {
+       start-stop-daemon --stop --retry 5 --quiet --pidfile /var/run/gosa-si-client.pid --name gosa-si-client
 }
 
 
@@ -56,6 +66,10 @@ start)  log_daemon_msg "Starting GOsa support infrastructure"
                log_progress_msg "daemon"
                start_server --no-bus
        fi
+       if [ "$START_CLIENT" == "1" -a -x /usr/sbin/gosa-si-client ]; then
+               log_progress_msg "client"
+               start_client
+       fi
         log_end_msg $?
        ;;
 stop)   log_daemon_msg "Stopping GOsa support infrastructure"
@@ -68,20 +82,29 @@ stop)   log_daemon_msg "Stopping GOsa support infrastructure"
                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
         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
-               log_progress_msg "done"
        else
                stop_server
                start_server --no-bus
-               log_progress_msg "done"
        fi
+       if [ "$START_CLIENT" == "1" -a -x /usr/sbin/gosa-si-client ]; then
+               start_client
+       fi
+       log_progress_msg "done"
         log_end_msg $?
         ;;
 *)     log_action_msg "Usage: /etc/init.d/gosa-si {start|stop|restart|reload|force-reload}"