Compare commits

...

3 Commits

Author SHA1 Message Date
tteckster 6f2f334a81
Update unifi.sh
fix update
2023-05-07 10:52:17 -04:00
tteckster 29f34c8b51
Update unifi-install.sh
tweak
2023-05-07 10:44:54 -04:00
tteckster 1c1f986cee
Update unifi-install.sh
Code refactoring
2023-05-07 10:39:56 -04:00
2 changed files with 18 additions and 11 deletions

View File

@ -54,8 +54,8 @@ function update_script() {
header_info
if [[ ! -d /usr/lib/unifi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating ${APP}"
wget -qL https://get.glennr.nl/unifi/update/unifi-update.sh
bash unifi-update.sh
apt-get update
apt-get install -y unifi
msg_ok "Updated Successfully"
exit
}

View File

@ -17,24 +17,31 @@ msg_info "Installing Dependencies"
$STD apt-get install -y curl
$STD apt-get install -y sudo
$STD apt-get install -y mc
$STD apt-get install -y apt-transport-https
msg_ok "Installed Dependencies"
read -r -p "Local Controller? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
LOCAL="--local-controller"
else
LOCAL=""
fi
msg_info "Installing OpenJDK"
$STD apt-get install -y openjdk-11-jre-headless
$STD apt-mark hold openjdk-11-*
msg_ok "Installed OpenJDK"
msg_info "Installing UniFi Network Application (Patience)"
wget -qL https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh
$STD bash unifi-latest.sh --skip --add-repository $LOCAL
msg_info "Installing MongoDB"
wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb
$STD dpkg -i mongodb-org-server_3.6.23_amd64.deb
msg_ok "Installed MongoDB"
msg_info "Installing UniFi Network Application"
wget -qO /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' >/etc/apt/sources.list.d/100-ubnt-unifi.list
$STD apt-get update
$STD apt-get install -y unifi
msg_ok "Installed UniFi Network Application"
motd_ssh
root
msg_info "Cleaning up"
rm -rf mongodb-org-server_3.6.23_amd64.deb
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"