From 60e2cdd1d76cec00b31484af6f046f418512d515 Mon Sep 17 00:00:00 2001 From: HgO Date: Mon, 21 Aug 2023 23:24:01 +0200 Subject: [PATCH] fix check hostapd status --- scripts/config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/config b/scripts/config index 1c26524..7cdcbe5 100644 --- a/scripts/config +++ b/scripts/config @@ -37,9 +37,9 @@ get__no_antenna() { get__status() { local service_enabled=$(ynh_app_setting_get $app service_enabled) - if systemctl is-active hostapd -q + if systemctl is-active hostapd@$app -q then - if [ $service_enabled -eq 1 ] + if [[ $service_enabled -eq 1 ]] then cat << EOF style: success @@ -54,7 +54,7 @@ ask: en: Your Hotspot is running, but it shouldn't ! EOF fi - elif [ $service_enabled -eq 1 ] + elif [[ $service_enabled -eq 1 ]] then cat << EOF style: danger @@ -62,7 +62,7 @@ ask: en: |- Your Hotspot is down ! Here are errors logged in the last 5 minutes \`\`\` -$(journalctl -u hostapd -n10 -o cat | sed 's/^/ /g') +$(journalctl -u hostapd@$app -n10 -o cat | sed 's/^/ /g') \`\`\` EOF else