I am trying to check if my computer is connected with VPN (NORDVPN)
My script in bash is the following:
STATUS = "$(nordvpn status | head -n 1)"
printf "STATUS %s\n" "$STATUS"
if [[ $STATUS == "Status: Disconnected" ]]
then
echo "Disconnected from VPN..."
nordvpn connect Salt_Lake_City
fi
I get the following output:
STATUS: command not found
STATUS
Thanks in advance
What I would do:
or