Skip to content

Instantly share code, notes, and snippets.

View UBNT-cmb's full-sized avatar

Chris Buechler UBNT-cmb

  • Ubiquiti Inc
  • Austin, TX
View GitHub Profile
@UBNT-cmb
UBNT-cmb / unifi-get-stat-device-api.sh
Created October 18, 2018 04:57
example of getting UniFi device stats from controller API
#!/bin/sh
username=username
password=password
baseurl=https://localhost:8443
site=default
cookie=/tmp/unifi_cookie
mac=aa:bb:cc:dd:ee:ff
curl_cmd="curl --tlsv1 --silent --cookie ${cookie} --cookie-jar ${cookie} --insecure "
@UBNT-cmb
UBNT-cmb / gist:f975d142dcece1c4cb53d5d401131b87
Created September 14, 2018 02:02
unifi-bulk-add-radius-users.sh
#!/bin/sh
# Example to bulk add RADIUS users to UniFi from csv in /tmp/users
# format of /tmp/users like:
# user1,password1
# user2,password2
# change username and password to controller admin credentials, and baseurl to actual controller URL
username=admin
password=password