From: opensides Date: Tue, 18 May 2010 17:15:36 +0000 (+0000) Subject: - Don't start the server by default because the config will not be right X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e512539df3aab017c52cf2dce9faefe0722556b6;p=gosa.git - Don't start the server by default because the config will not be right - Add variable to say if the server should be started or not git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18538 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/debian/gosa-si-client.init b/gosa-si/debian/gosa-si-client.init index 7282850c5..4bc3f209d 100644 --- a/gosa-si/debian/gosa-si-client.init +++ b/gosa-si/debian/gosa-si-client.init @@ -38,8 +38,8 @@ start_client() { # to be rewritten ugly !! stop_client() { start-stop-daemon --stop --retry 5 --quiet --pidfile ${PIDFILE_CLIENT} --name ${CLIENT} - kill `ps -C gosa-si-client -o pid=` > /dev/null 2>&1 - ! ps -C gosa-si-client -o pid= > /dev/null 2>&1 +# kill `ps -C gosa-si-client -o pid=` > /dev/null 2>&1 +# ! ps -C gosa-si-client -o pid= > /dev/null 2>&1 } case "$1" in @@ -80,7 +80,7 @@ status) fi ;; -*) log_action_msg "Usage: /etc/init.d/gosa-si-client {start|stop|restart||reload|force-reload|status}" +*) log_action_msg "Usage: /etc/init.d/gosa-si-client {start|stop|restart|reload|force-reload|status}" exit 2 ;; esac diff --git a/gosa-si/debian/gosa-si-server.default b/gosa-si/debian/gosa-si-server.default index 595c21dec..9c37a35c8 100644 --- a/gosa-si/debian/gosa-si-server.default +++ b/gosa-si/debian/gosa-si-server.default @@ -1,5 +1,5 @@ # Should we start the server -START_SERVER=1 +START_SERVER=0 # Configure Debuging Level DEBUG=-vvvvvvv # Debug parts of GOsa-si server see man gosa-si-server diff --git a/gosa-si/debian/gosa-si-server.init b/gosa-si/debian/gosa-si-server.init index 4b77e3af5..94888ca81 100644 --- a/gosa-si/debian/gosa-si-server.init +++ b/gosa-si/debian/gosa-si-server.init @@ -32,34 +32,34 @@ if [ ! -d "/var/run/gosa-si" ]; then fi start_server() { - start-stop-daemon --start --quiet --pidfile ${PIDFILE_SERVER} --name ${SERVER} --startas ${DAEMON_SERVER} -- $DEBUG + start-stop-daemon --start --quiet --pidfile ${PIDFILE_SERVER} --name ${SERVER} --startas ${DAEMON_SERVER} -- $1 $DEBUG } # to be changed ugly stop_server() { start-stop-daemon --stop --retry 5 --quiet --pidfile ${PIDFILE_SERVER} --name ${SERVER} - kill `ps -C gosa-si-server -o pid=` > /dev/null 2>&1 - ! ps -C gosa-si-server -o pid= > /dev/null 2>&1 +#kill `ps -C gosa-si-server -o pid=` > /dev/null 2>&1 +# ! ps -C gosa-si-server -o pid= > /dev/null 2>&1 } case "$1" in start) log_daemon_msg "Starting GOsa support infrastructure Server" - if [ -x ${DAEMON_SERVER} ]; then - log_progress_msg "daemon" + if [ "$START_SERVER" = "1" -a -x ${DAEMON_SERVER} ]; then + log_progress_msg "server" start_server fi log_end_msg $? ;; stop) log_daemon_msg "Stopping GOsa support infrastructure Server" - if [ -x ${DAEMON_SERVER} ]; then - log_progress_msg "daemon" + if [ "$START_SERVER" = "1" -a -x ${DAEMON_SERVER} ]; then + log_progress_msg "server" stop_server fi log_end_msg $? ;; reload|force-reload|restart) log_daemon_msg "Restarting GOsa support infrastructure Server" - if [ -x ${DAEMON_SERVER} ]; then + if [ "$START_SERVER" = "1" -a -x ${DAEMON_SERVER} ]; then stop_server start_server fi @@ -67,15 +67,17 @@ reload|force-reload|restart) log_daemon_msg "Restarting GOsa support infrastruct log_end_msg $? ;; status) - status=0 - pidofproc -p "${PIDFILE_SERVER}" "${DAEMON_SERVER}" >/dev/null || status="$?" - log_daemon_msg "Status of GOsa-si server" "${NAME}" - if [ "$status" = 0 ]; then - log_progress_msg "is running" - log_end_msg 0 - else - log_progress_msg "is not running" - log_end_msg $status + if [ "$START_SERVER" = "1" -a -x ${DAEMON_SERVER} ]; then + status=0 + pidofproc -p "${PIDFILE_SERVER}" "${DAEMON_SERVER}" >/dev/null || status="$?" + log_daemon_msg "Status of GOsa-si server" "${NAME}" + if [ "$status" = 0 ]; then + log_progress_msg "is running" + log_end_msg 0 + else + log_progress_msg "is not running" + log_end_msg $status + fi fi ;; diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client index 6675b6ae3..a09851504 100755 --- a/gosa-si/gosa-si-client +++ b/gosa-si/gosa-si-client @@ -99,7 +99,7 @@ my $client_status; my $event_dir = "/usr/lib/gosa-si/client/events"; use lib "/usr/lib/gosa-si/client/events"; -my (%cfg_defaults, $foreground, $verbose, $pid_file, $procid, $pid, $log_file, $fai_logpath); +my (%cfg_defaults, $foreground, $pid_file, $procid, $pid, $log_file, $fai_logpath); my ($server_ip, $server_port, $server_timeout, $server_domain, $server_key_lifetime); my ($client_port, $ldap_enabled, $ldap_config, $pam_config, $nss_config); my ($root_uid, $adm_gid);