diff --git a/check-systemctl-service.sh b/check-systemctl-service.sh index cd468d4..7c2811d 100644 --- a/check-systemctl-service.sh +++ b/check-systemctl-service.sh @@ -78,7 +78,7 @@ script_name=$(basename "${0}") script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) GetOptions "$@" -if [[ $(systemctl ${user} list-unit-files "${service}*" | wc -l) -gt 3 ]]; then +if [[ $(systemctl ${user} list-units "${service}*" | wc -l) -gt 3 ]]; then result=$(systemctl ${user} is-active ${service}) else result='inexistent'