1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hotspot_ynh.git synced 2024-09-03 19:25:53 +02:00

fix check hostapd status

This commit is contained in:
HgO 2023-08-21 23:24:01 +02:00
parent 5e89bf7d91
commit 60e2cdd1d7

View file

@ -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