Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Download a new UniFi Controller Firmware and install it
#!/usr/bin/env bash
# Download a new UniFi Controller Firmware and install it
# Used to to automate the installation of newer controller firmware on a UniFi Cloud Key
# Author: Joerg Hochwald
# Copyright: Copyright (c) 2019, Joerg Hochwald - All rights reserved.
# LICENSE: License: https://opensource.org/licenses/BSD-3-Clause
# THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
if [ $1 ]; then
echo "Param is $1"
# File Name (e.g. where to save)
FILE=/tmp/unifi_sysvinit_all.deb
# make sure we are in the temp directory, just in case
cd /tmp
# Get the new file
wget $1 -O $FILE
# Check if we get the file
if test -f "$FILE"; then
# Install the new file
dpkg -i $FILE
# Cleanup
rm -rf $FILE
fi
else
echo "Please use the Source URL (From the UBNT Forum?) as parameter!"
echo 'Sample: ./unifi_controller_update.sh https://dl.ui.com/unifi/5.10.24/unifi_sysvinit_all.deb'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.