Skip to content

Instantly share code, notes, and snippets.

@jcconnell
jcconnell / unifi_wifi.sh
Last active December 28, 2023 17:09
A bash script to enable, disable or check the status of a UniFi WiFi network.
#!/bin/bash
unifi_username=USERNAME
unifi_password='PASSWORD'
unifi_controller=https://EXAMPLE.COM:8443
wifi_id=YOUR_WIFI_ID
cookie=/tmp/cookie
curl_cmd="curl -s -S --cookie ${cookie} --cookie-jar ${cookie} --insecure "