diff --git a/check_webservice_load.sh b/check_webservice_load.sh index 8e7c87d..fa32ec5 100755 --- a/check_webservice_load.sh +++ b/check_webservice_load.sh @@ -148,7 +148,7 @@ if $check_mysql ; then # - if systemctl -t service list-unit-files \ | grep -e "^mysql" \ - | grep -q enabled 2> /devnull ; then + | grep -q -E "(enabled|disabled)" 2> /devnull ; then MYSQLD_SERVICE_FILE=$(systemctl -t service list-unit-files \ | grep -e "^mysql" \ @@ -214,20 +214,6 @@ if $check_apache ; then fi fi - if $systemd_supported ; then - # - Is Service exclusive controlled by systemd - # - - if systemctl -t service list-unit-files \ - | grep -e "^mysql" \ - | grep -q enabled 2> /devnull ; then - - MYSQLD_SERVICE_FILE=$(systemctl -t service list-unit-files \ - | grep -e "^mysql" \ - | awk '{print$1}') - fi - - fi - APACHE_SERVICE_FILE="" APACHE_INIT_SCRIPT="" if $systemd_supported ; then @@ -235,7 +221,7 @@ if $check_apache ; then # - if systemctl -t service list-unit-files \ | grep -e "^apache" \ - | grep -q enabled 2> /devnull ; then + | grep -q -E "(enabled|disabled)" 2> /devnull ; then APACHE_SERVICE_FILE=$(systemctl -t service list-unit-files \ | grep -e "^apache" \