diff --git a/Modular Scripts/Apache2/configure-apache.sh b/Modular Scripts/Apache2/configure-apache.sh index 48f30c9..48dc167 100644 --- a/Modular Scripts/Apache2/configure-apache.sh +++ b/Modular Scripts/Apache2/configure-apache.sh @@ -113,7 +113,11 @@ checkApacheDetails() getApacheServiceName #verify if apache is installed as service - if [ ! -f /etc/init.d/$SERVICE ]; then + if [ -f /etc/init.d/$SERVICE ]; then + logMsgToConfigSysLog "INFO" "INFO: Apache is present as a service." + elif [[ $(which systemctl) && $(systemctl list-unit-files $SERVICE.service | grep "$SERVICE.service") ]] &>/dev/null; then + logMsgToConfigSysLog "INFO" "INFO: Apache is present as a service." + else logMsgToConfigSysLog "ERROR" "ERROR: Apache is not configured as a service" exit 1 fi