9 lines
421 B
Bash
Executable File
9 lines
421 B
Bash
Executable File
#!/bin/bash
|
|
VERSION=$(wget --header='X-Requested-With: XMLHttpRequest' 'https://www.ui.com/download/?platform=unifi' -O - | jq '.downloads | .[] | select(.filename=="unifi_sysvinit_all.deb") | .version' | sed 's/"//g' | sort -V | tail -n 1)
|
|
|
|
wget https://dl.ui.com/unifi/$VERSION/unifi_sysvinit_all.deb -O - > /tmp/unifi_sysvinit_all.deb
|
|
|
|
dpkg -i /tmp/unifi_sysvinit_all.deb
|
|
apt install -f
|
|
rm /tmp/unifi_sysvinit_all.deb
|