Skip to content

Instantly share code, notes, and snippets.

@TechnologistAU
Created January 10, 2018 10:59
Show Gist options
  • Save TechnologistAU/d81c5de263abd0658ebc2d71fb4165d0 to your computer and use it in GitHub Desktop.
Save TechnologistAU/d81c5de263abd0658ebc2d71fb4165d0 to your computer and use it in GitHub Desktop.
UniFi 4 Installation Script for Raspberry Pi
#!/bin/bash
################################################################################
#
# This script automates the installation of the UniFi controller software on the
# Raspberry Pi.
#
# http://www.technologist.site/ubnt
#
################################################################################
apt-get update && apt-get -y upgrade
apt-get -y install dirmngr
echo 'deb http://www.ubnt.com/downloads/unifi/debian unifi4 ubiquiti' > /etc/apt/sources.list.d/100-ubnt.list
apt-key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50
apt-get update
apt-get -y install unifi
systemctl stop mongodb
systemctl disable mongodb
rm /usr/lib/unifi/lib/snappy-java-1.0.5.jar
wget https://repo1.maven.org/maven2/org/xerial/snappy/snappy-java/1.1.2/snappy-java-1.1.2.jar -O /usr/lib/unifi/lib/snappy-java-1.1.2.jar
ln -s /usr/lib/unifi/lib/snappy-java-1.1.2.jar /usr/lib/unifi/lib/snappy-java-1.0.5.jar
if [[ "$(uname -m)" =~ ^armv6.* ]]; then
rm /usr/lib/unifi/lib/native/Linux/armhf/libubnt_webrtc_jni.so
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment