Last active
June 16, 2024 08:57
-
-
Save devversion/2a613562a2adbf89ff6f60fa8c76482a to your computer and use it in GitHub Desktop.
Toggle Wifi of Unifi standalone AP using SSH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mode=$1 # enabled or disabled | |
sshpass -p <PW> ssh -o StrictHostKeyChecking=no admin@<ip> <<EOF | |
sed -i "s/wireless.status=.*/wireless.status=$mode/" /tmp/system.cfg | |
cfgmtd -f /tmp/system.cfg -w | |
reboot now | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment