From 9b7ec42f6eee92c396eeb4a8b5956b570ad007bd Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 29 Jan 2018 03:05:17 +0100 Subject: [PATCH] Fix error in determin systemd script for mysql and apache2. --- check_webservice_load.sh | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) 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" \