mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Fix token request loop
This commit is contained in:
parent
9656539d48
commit
f5b2a50a11
1 changed files with 7 additions and 2 deletions
|
@ -2124,7 +2124,7 @@ _get_token() {
|
|||
[ "$(uci -q get openmptcprouter.${servername}.disabled)" = "1" ] && return
|
||||
token=""
|
||||
_login
|
||||
[ -z "$token" ] && {
|
||||
if [ -z "$token" ]; then
|
||||
reason=""
|
||||
test_ping() {
|
||||
_ping_server $1
|
||||
|
@ -2163,7 +2163,12 @@ _get_token() {
|
|||
uci -q batch <<-EOF >/dev/null
|
||||
set openmptcprouter.${servername}.admin_error=1
|
||||
EOF
|
||||
}
|
||||
else
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set openmptcprouter.${servername}.token_error=0
|
||||
commit openmptcprouter
|
||||
EOF
|
||||
fi
|
||||
echo "$server:$serverport:$token"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue