Fix bug in determin 'APACHE_SERVICE_FILE'.

This commit is contained in:
Christoph 2018-08-01 11:42:57 +02:00
parent f48a22c345
commit 0154e78671

View File

@ -293,12 +293,20 @@ if $check_apache ; then
# - Is Service exclusive controlled by systemd
# -
if systemctl -t service list-unit-files \
| grep -e "^apache2.service" \
| grep -q -E "(enabled|disabled)" 2> /devnull ; then
APACHE_SERVICE_FILE="apache2.service"
elif systemctl -t service list-unit-files \
| grep -e "^apache" \
| grep -q -E "(enabled|disabled)" 2> /devnull ; then
APACHE_SERVICE_FILE=$(systemctl -t service list-unit-files \
| grep -e "^apache" \
| awk '{print$1}')
| awk '{print$1}' \
| head -1)
fi
fi
@ -316,6 +324,7 @@ if $check_apache ; then
fi
fi
if $check_nginx ; then
NGINXD="$(realpath $(which nginx))"