From 77170e98720fc23000a604a967071b26c287e22d Mon Sep 17 00:00:00 2001 From: root Date: Sun, 18 Feb 2018 01:13:41 +0100 Subject: [PATCH] install_httpd-2.4.sh: Start apache2 after installation, even if the service was not running. --- install_httpd-2.4.sh | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/install_httpd-2.4.sh b/install_httpd-2.4.sh index d41064f..00fb216 100755 --- a/install_httpd-2.4.sh +++ b/install_httpd-2.4.sh @@ -3945,28 +3945,32 @@ if [[ -n "$_httpd_current_version" ]]; then fi # if [[ -n "$_httpd_current_version" ]] -if $START_APACHE_WEBSERVICE ; then - echo "" >> ${_logdir}/main.log - echo "" >> ${_logdir}/main.log - echo "## - Start Apache Webserver" >> ${_logdir}/main.log - echo "## -" >> ${_logdir}/main.log - echo "" - echononl "\tStarting Apache Webserver.." - if $SYSTEMD_SUPPORTED ; then - echo "systemctl start apache2" >> ${_logdir}/main.log - systemctl start apache2 >> ${_logdir}/main.log 2>&1 - else - echo "/etc/init.d/apache2 start" >> ${_logdir}/main.log - /etc/init.d/apache2 start >> ${_logdir}/main.log 2>&1 - fi - if [ "$?" = "0" ]; then - echo_ok - else - echo_failed - warn "Starting Apache Webservice failed!." - fi +# --- +# - Start apache webservice +# --- +echo "" >> ${_logdir}/main.log +echo "" >> ${_logdir}/main.log +echo "## - Start Apache Webserver" >> ${_logdir}/main.log +echo "## -" >> ${_logdir}/main.log +echo "" +echononl "\tStarting Apache Webserver.." +if $SYSTEMD_SUPPORTED ; then + echo "systemctl start apache2" >> ${_logdir}/main.log + systemctl start apache2 >> ${_logdir}/main.log 2>&1 +else + echo "/etc/init.d/apache2 start" >> ${_logdir}/main.log + /etc/init.d/apache2 start >> ${_logdir}/main.log 2>&1 +fi +if [ "$?" = "0" ]; then + echo_ok +else + echo_failed + warn "Starting Apache Webservice failed!." fi +# --- +# - Reenable crontab for user root +# --- echo echononl "\tReenable crontab for user root .." echo "" >> ${_logdir}/main.log