#!/bin/bash # UniFi-Video 3.10.4 auto installation script. # Version | 3.0.5 # Author | Glenn Rietveld # Email | glennrietveld8@hotmail.nl # Website | https://GlennR.nl ################################################################################################################################################################################################### # # # Color Codes # # # ################################################################################################################################################################################################### RESET='\033[0m' GRAY='\033[0;37m' WHITE='\033[1;37m' GRAY_R='\033[38m' WHITE_R='\033[38m' RED='\033[1;31m' # Light Red. GREEN='\033[1;32m' # Light Green. BOLD='\e[1m' ################################################################################################################################################################################################### # # # Start Checks # # # ################################################################################################################################################################################################### # Check for root (SUDO). if [[ "$EUID" -ne 0 ]]; then clear clear echo -e "${RED}#########################################################################${RESET}" echo "" echo -e "${WHITE_R}#${RESET} The script need to be run as root..." echo "" echo "" echo -e "${WHITE_R}#${RESET} For Ubuntu based systems run the command below to login as root" echo -e "${GREEN}#${RESET} sudo -i" echo "" echo -e "${WHITE_R}#${RESET} For Debian based systems run the command below to login as root" echo -e "${GREEN}#${RESET} su" echo "" echo "" exit 1 fi while [ -n "$1" ]; do case "$1" in -skip) script_option_skip=true;; esac shift done rm -rf $0 2> /dev/null rm -rf unifi-video-3.10.4.sh 2> /dev/null if [[ $script_option_skip == 'true' ]]; then wget https://get.glennr.nl/unifi-video/install/unifi-video-3.10.4.sh; chmod +x unifi-video-3.10.4.sh; sudo ./unifi-video-3.10.4.sh -skip; exit 0 else wget https://get.glennr.nl/unifi-video/install/unifi-video-3.10.4.sh; chmod +x unifi-video-3.10.4.sh; sudo ./unifi-video-3.10.4.sh; exit 0 fi