FIX(2.2.1.2): custom func not working for systemd (#90)

fix #87
This commit is contained in:
Thibault Ayanides 2021-04-27 13:49:05 +02:00 committed by GitHub
parent fc8a2b2561
commit 1cade2e375
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,8 +21,8 @@ SERVICE_NAME="systemd-timesyncd"
# This function will be called if the script status is on enabled / audit mode
audit() {
is_service_enabled "$SERVICE_NAME"
if [ "$FNRET" = 0 ]; then
status=$(systemctl is-enabled "$SERVICE_NAME")
if [ "$status" = "enabled" ]; then
ok "$SERVICE_NAME is enabled"
else
crit "$SERVICE_NAME is disabled"