mirror of
https://github.com/unraid/api.git
synced 2026-01-04 07:29:48 -06:00
Fix: rc.flashbackup needs to check both signed in and connected (#882)
because /var/local/emhttp/myservers.cfg does not clear the connected status when the user signs out
This commit is contained in:
@@ -160,7 +160,14 @@ _connected() {
|
||||
CFG=/var/local/emhttp/myservers.cfg
|
||||
[[ ! -f "${CFG}" ]] && return 1
|
||||
# shellcheck disable=SC1090
|
||||
source <(sed -nr '/\[remote\]/,/\[/{/username/p}' "${CFG}" 2>/dev/null)
|
||||
# ensure signed in
|
||||
if [ -z "${username}" ]; then
|
||||
return 1
|
||||
fi
|
||||
# shellcheck disable=SC1090
|
||||
source <(sed -nr '/\[connectionStatus\]/,/\[/{/minigraph/p}' "${CFG}" 2>/dev/null)
|
||||
# ensure connected
|
||||
if [[ -z "${minigraph}" || "${minigraph}" != "CONNECTED" ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user