mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-24 07:56:24 +01:00
52 lines
1.3 KiB
Bash
52 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2021-2025 tteck
|
|
# Author: tteck (tteckster)
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://ui.com/download/unifi
|
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
color
|
|
verb_ip6
|
|
catch_errors
|
|
setting_up_container
|
|
network_check
|
|
update_os
|
|
|
|
msg_info "Installing Dependencies"
|
|
$STD apt install -y apt-transport-https
|
|
msg_ok "Installed Dependencies"
|
|
|
|
setup_deb822_repo \
|
|
"unifi" \
|
|
"https://dl.ui.com/unifi/unifi-repo.gpg" \
|
|
"https://www.ui.com/downloads/unifi/debian" \
|
|
"stable" \
|
|
"ubiquiti" \
|
|
"amd64"
|
|
|
|
JAVA_VERSION="21" setup_java
|
|
|
|
if lscpu | grep -q 'avx'; then
|
|
MONGO_VERSION="8.0" setup_mongodb
|
|
else
|
|
msg_error "No AVX detected (CPU-Flag)! We have discontinued support for this. You are welcome to try it manually with a Debian LXC, but due to the many issues with Unifi, we currently only support AVX CPUs."
|
|
exit 10
|
|
fi
|
|
|
|
if ! dpkg -l | grep -q 'libssl1.1'; then
|
|
msg_info "Installing libssl (if needed)"
|
|
curl -fsSL "https://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1w-0+deb11u4_amd64.deb" -o "/tmp/libssl.deb"
|
|
$STD dpkg -i /tmp/libssl.deb
|
|
rm -f /tmp/libssl.deb
|
|
msg_ok "Installed libssl1.1"
|
|
fi
|
|
|
|
msg_info "Installing UniFi Network Server"
|
|
$STD apt install -y unifi
|
|
msg_ok "Installed UniFi Network Server"
|
|
|
|
motd_ssh
|
|
customize
|
|
cleanup_lxc
|