summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0d8819a)
raw | patch | inline | side by side (parent: 0d8819a)
author | opensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 18 May 2010 17:15:36 +0000 (17:15 +0000) | ||
committer | opensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 18 May 2010 17:15:36 +0000 (17:15 +0000) |
- 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
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18538 594d385d-05f5-0310-b6e9-bd551577e9d8
index 7282850c52365ddd34d7655a6b02c7afbcc1ed98..4bc3f209d69746dba72547ecacb143207bd57efc 100644 (file)
# 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
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
index 595c21dec11a3079526cd9c1b5546f7339552931..9c37a35c8291205a18dde19a31f3484ca39d69d5 100644 (file)
# 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
index 4b77e3af570075d806987b68dc4a6416e1676141..94888ca815e1432c2769fe6e0c123ec20437151b 100644 (file)
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 6675b6ae3cbabaecb18f56cc85b44062817cc5ac..a098515049c290af094ffbda547e27c8084d49ad 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
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);