diff --git a/install_sympa.sh b/install_sympa.sh index 6d8ee6c..1ed5817 100755 --- a/install_sympa.sh +++ b/install_sympa.sh @@ -2162,7 +2162,7 @@ else fi sleep 5 - _PIDS=`ps -e f | grep -E "${SYMPA_BASE_PATH}/s?bin/" 2>/dev/null | grep -v grep | awk '{print$1}'` + _PIDS=`ps -e f | grep -E "${SYMPA_BASE_PATH}/s?bin/sympa" 2>/dev/null | grep -v grep | awk '{print$1}'` if [ -n "$_PIDS" ]; then warn "Found running sympa processes. Going to kill them.." @@ -2171,6 +2171,52 @@ else done fi + ## - Stop Sympa's wwsympa.fcgi processes + ## - + echononl "\tStopping Sympa's wwsympa.fcgi processes .." + if ps -e f | grep -E "${SYMPA_BASE_PATH}/s?bin/wwsympa.fcgi" 2>/dev/null | grep -v grep > /dev/null 2>&1 ; then + echo "" >> $_log_file + echo "## - Stopping Sympa's wwsympa.fcgi processes.." >> $_log_file + echo "## -" >> $_log_file + if $SYSTEMD_SUPPORTED ; then + echo "systemctl stop "wwsympa.service >> $_log_file + systemctl stop wwsympa.service >> $_log_file 2>&1 + if [ "$?" = "0" ]; then + echo_ok + else + echo_failed + error "Stopping Sympa's wwsympa.fcgi processes (systemd service) failed! \n + See '${_log_file}' for further informations." + fi + else + if [[ -x "${SYMPA_INIT_DIR}/wwsympa" ]]; then + echo "${SYMPA_INIT_DIR}/wwsympa stop" >> $_log_file + ${SYMPA_INIT_DIR}/wwsympa stop >> $_log_file 2>&1 + if [ "$?" = "0" ]; then + echo_ok + else + echo_failed + error "Stopping Sympai's wwsympa.fcgi processes (SysV Initscript) failed! \n + See '${_log_file}' for further informations." + fi + else + echo_skipped + fi + fi + else + echo_skipped + fi + + sleep 5 + _PIDS=`ps -e f | grep -E "${SYMPA_BASE_PATH}/s?bin/wwsympa.fcgi" 2>/dev/null | grep -v grep | awk '{print$1}'` + + if [ -n "$_PIDS" ]; then + warn "Found running wwsympa.fcgi processes. Going to kill them.." + for _pid in $_PIDS ; do + kill -9 $_pid > /dev/null 2>&1 + done + fi + ## --- ## --- Handle Sympa's Installation Directory