install_sympa.sh: fix error in determin systemd service file for apache2 webserver.
This commit is contained in:
parent
5d657315fd
commit
7924ad23e6
@ -316,8 +316,9 @@ if $SYSTEMD_SUPPORTED ; then
|
||||
| grep -q -E "(enabled|disabled|generated)" 2> /devnull ; then
|
||||
|
||||
APACHE_SERVICE_FILE=$(systemctl -t service list-unit-files \
|
||||
| grep -e "^apache2" \
|
||||
| awk '{print$1}')
|
||||
| grep -E "^apache2\.service" \
|
||||
| awk '{print$1}' \
|
||||
| head -1 )
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -1566,6 +1567,8 @@ if ! $UPDATE_SYMPA ; then
|
||||
fi
|
||||
echo "" >> $_log_file
|
||||
echo "SYSTEMD_SUPPORTED=$SYSTEMD_SUPPORTED" >> $_log_file
|
||||
echo "APACHE_INIT_SCRIPT=$APACHE_INIT_SCRIPT" >> $_log_file
|
||||
echo "APACHE_SERVICE_FILE=$APACHE_SERVICE_FILE" >> $_log_file
|
||||
|
||||
echo "" >> $_log_file
|
||||
echo "_src_base_dir=$_src_base_dir" >> $_log_file
|
||||
@ -3848,10 +3851,8 @@ echo"" >> $_log_file
|
||||
if $UPDATE_SYMPA ; then
|
||||
info "Configuration will be omitted. No mailserver configuration needed in update mode."
|
||||
|
||||
echo "" >> $_log_file
|
||||
|
||||
echo "# --- Configuration will be omitted. Noimailserver configuration needed in update mode." >> $_log_file
|
||||
echo "# ---" >> $_log_file
|
||||
echo "## - [Info]: Configuration will be omitted. No mailserver configuration" >> $_log_file
|
||||
echo "## - needed in update mode." >> $_log_file
|
||||
|
||||
else
|
||||
|
||||
@ -4428,6 +4429,9 @@ echo "" >> $_log_file
|
||||
if $SYSTEMD_SUPPORTED ; then
|
||||
|
||||
echononl "\tReload systemd configuration"
|
||||
echo "" >> $_log_file
|
||||
echo "## - Reload systemd configuration.." >> $_log_file
|
||||
echo "## -" >> $_log_file
|
||||
echo "systemctl daemon-reload" >> $_log_file
|
||||
systemctl daemon-reload >> $_log_file 2>&1
|
||||
if [ "$?" = "0" ]; then
|
||||
@ -4440,6 +4444,8 @@ if $SYSTEMD_SUPPORTED ; then
|
||||
|
||||
echononl "\tStarting Sympa mailing list manager .."
|
||||
echo "" >> $_log_file
|
||||
echo "## - Starting Sympa mailing list manager .." >> $_log_file
|
||||
echo "## -" >> $_log_file
|
||||
echo "systemctl start sympa" >> $_log_file
|
||||
systemctl start sympa.service >> $_log_file 2>&1
|
||||
if [ "$?" = "0" ]; then
|
||||
@ -4458,6 +4464,8 @@ if $SYSTEMD_SUPPORTED ; then
|
||||
echononl "\tStarting Sympa Webservice .."
|
||||
if [[ -f "${SYMPA_SYSTEMD_DIR}/wwsympa.service" ]]; then
|
||||
echo "" >> $_log_file
|
||||
echo "## - Starting Sympa Webservice .." >> $_log_file
|
||||
echo "## -" >> $_log_file
|
||||
echo "systemctl start wwsympa.service" >> $_log_file
|
||||
systemctl start wwsympa.service >> $_log_file 2>&1
|
||||
if [ "$?" = "0" ]; then
|
||||
@ -4475,6 +4483,8 @@ else
|
||||
if $UPDATE_SYMPA ; then
|
||||
echononl "\tRestarting Sympa mailing list manager .."
|
||||
echo "" >> $_log_file
|
||||
echo "## - Restarting Sympa mailing list manager .." >> $_log_file
|
||||
echo "## -" >> $_log_file
|
||||
echo "${SYMPA_INIT_DIR}/sympa restart" >> $_log_file
|
||||
${SYMPA_INIT_DIR}/sympa restart >> $_log_file 2>&1
|
||||
if [ "$?" = "0" ]; then
|
||||
@ -4486,6 +4496,8 @@ else
|
||||
else
|
||||
echononl "\tStarting Sympa mailing list manager .."
|
||||
echo "" >> $_log_file
|
||||
echo "## - Starting Sympa mailing list manager .." >> $_log_file
|
||||
echo "## -" >> $_log_file
|
||||
echo "${SYMPA_INIT_DIR}/sympa start" >> $_log_file
|
||||
${SYMPA_INIT_DIR}/sympa start >> $_log_file 2>&1
|
||||
if [ "$?" = "0" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user