mod: whitespace
This commit is contained in:
@@ -23,11 +23,13 @@ if [[ ! $route =~ [[:space:]]dev[[:space:]]([^[:space:]]+) ]]; then
|
||||
jq -cn '{text: "⚠ Disconnected", class: "disconnected"}'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
interface=${BASH_REMATCH[1]}
|
||||
if [[ ! $route =~ [[:space:]]src[[:space:]]([0-9.]+) ]]; then
|
||||
jq -cn '{text: "⚠ Disconnected", class: "disconnected"}'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
local_ip=${BASH_REMATCH[1]}
|
||||
|
||||
if [[ -s $state_file ]]; then
|
||||
@@ -48,4 +50,5 @@ if [[ $(nmcli -g GENERAL.TYPE device show "$interface" 2>/dev/null) == wifi ]];
|
||||
else
|
||||
text=" $local_ip"
|
||||
fi
|
||||
|
||||
jq -cn --arg text "$text" '{text: $text, class: "connected"}'
|
||||
|
||||
Reference in New Issue
Block a user