install_sympa.sh: stop/start also 'wwsympa.fcgi' processes.

This commit is contained in:
Christoph 2020-10-23 13:01:54 +02:00
parent f01859c670
commit 2b06762acf

View File

@ -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