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:
parent
5e89bf7d91
commit
60e2cdd1d7
1 changed files with 4 additions and 4 deletions
|
@ -37,9 +37,9 @@ get__no_antenna() {
|
||||||
|
|
||||||
get__status() {
|
get__status() {
|
||||||
local service_enabled=$(ynh_app_setting_get $app service_enabled)
|
local service_enabled=$(ynh_app_setting_get $app service_enabled)
|
||||||
if systemctl is-active hostapd -q
|
if systemctl is-active hostapd@$app -q
|
||||||
then
|
then
|
||||||
if [ $service_enabled -eq 1 ]
|
if [[ $service_enabled -eq 1 ]]
|
||||||
then
|
then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
style: success
|
style: success
|
||||||
|
@ -54,7 +54,7 @@ ask:
|
||||||
en: Your Hotspot is running, but it shouldn't !
|
en: Your Hotspot is running, but it shouldn't !
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
elif [ $service_enabled -eq 1 ]
|
elif [[ $service_enabled -eq 1 ]]
|
||||||
then
|
then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
style: danger
|
style: danger
|
||||||
|
@ -62,7 +62,7 @@ ask:
|
||||||
en: |-
|
en: |-
|
||||||
Your Hotspot is down ! Here are errors logged in the last 5 minutes
|
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
|
EOF
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue