This commit is contained in:
Slaviša Arežina 2025-12-10 21:33:33 +01:00 committed by GitHub
parent 0ed1e36d9d
commit 300b4d2a3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 48 deletions

View File

@ -6,7 +6,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# Source: https://ui.com/download/unifi # Source: https://ui.com/download/unifi
APP="Unifi" APP="Unifi"
var_tags="${var_tags:-network;controller;unifi}" var_tags="${var_tags:-network;unifi}"
var_cpu="${var_cpu:-2}" var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}" var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}" var_disk="${var_disk:-8}"
@ -27,6 +27,7 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
msg_info "Updating ${APP}" msg_info "Updating ${APP}"
$STD apt update --allow-releaseinfo-change $STD apt update --allow-releaseinfo-change
$STD apt install -y unifi $STD apt install -y unifi

View File

@ -9,7 +9,7 @@
"updateable": true, "updateable": true,
"privileged": false, "privileged": false,
"interface_port": 8443, "interface_port": 8443,
"documentation": null, "documentation": "https://help.ui.com/hc/en-us/articles/360012282453-Self-Hosting-a-UniFi-Network-Server",
"website": "https://www.ui.com/", "website": "https://www.ui.com/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/ubiquiti-unifi.webp", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/ubiquiti-unifi.webp",
"config_path": "", "config_path": "",

View File

@ -17,63 +17,28 @@ msg_info "Installing Dependencies"
$STD apt install -y apt-transport-https $STD apt install -y apt-transport-https
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing Eclipse Temurin JRE" JAVA_VERION="17" setup_java
curl -fsSL "https://packages.adoptium.net/artifactory/api/gpg/key/public" | gpg --dearmor -o /usr/share/keyrings/adoptium.gpg setup_deb822_repo \
cat <<EOF | sudo tee /etc/apt/sources.list.d/adoptium.sources >/dev/null "unifi" \
Types: deb "https://dl.ui.com/unifi/unifi-repo.gpg" \
URIs: https://packages.adoptium.net/artifactory/deb "https://www.ui.com/downloads/unifi/debian" \
Suites: bookworm "stable" \
Components: main "ubiquiti" \
Architectures: amd64 "amd64"
Signed-By: /usr/share/keyrings/adoptium.gpg
EOF
$STD apt update
$STD apt install -y temurin-17-jre
msg_ok "Installed Eclipse Temurin JRE"
if ! grep -q -m1 'avx[^ ]*' /proc/cpuinfo; then if ! grep -q -m1 'avx[^ ]*' /proc/cpuinfo; then
msg_ok "No AVX Support Detected" msg_warn "No AVX Support Detected. MongoDB v4.4 will be installed"
msg_info "Installing MongoDB 4.4"
if ! dpkg -l | grep -q "libssl1.1"; then if ! dpkg -l | grep -q "libssl1.1"; then
curl -fsSL "https://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1w-0+deb11u4_amd64.deb" -o "libssl1.1_1.1.1w-0+deb11u4_amd64.deb" curl -fsSL "https://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1w-0+deb11u4_amd64.deb" -o "libssl1.1_1.1.1w-0+deb11u4_amd64.deb"
$STD dpkg -i libssl1.1_1.1.1w-0+deb11u4_amd64.deb $STD dpkg -i libssl1.1_1.1.1w-0+deb11u4_amd64.deb
fi fi
curl -fsSL "https://www.mongodb.org/static/pgp/server-4.4.asc" | gpg --dearmor -o /usr/share/keyrings/mongodb-server-4.4.gpg MONGO_VERSION="4.4" setup_mongodb
cat <<EOF | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.sources >/dev/null
Types: deb
URIs: https://repo.mongodb.org/apt/debian
Suites: buster/mongodb-org/4.4
Components: main
Signed-By: /usr/share/keyrings/mongodb-server-4.4.gpg
EOF
$STD apt update
$STD apt install -y mongodb-org
else else
msg_info "Installing MongoDB 7.0" MONGO_VERSION="7.0" setup_mongodb
curl -fsSL "https://www.mongodb.org/static/pgp/server-7.0.asc" | gpg --dearmor -o /usr/share/keyrings/mongodb-server-7.0.gpg
cat <<EOF | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.sources >/dev/null
Types: deb
URIs: http://repo.mongodb.org/apt/debian
Suites: bookworm/mongodb-org/7.0
Components: main
Signed-By: /usr/share/keyrings/mongodb-server-7.0.gpg
EOF
$STD apt update
$STD apt install -y mongodb-org
fi fi
msg_ok "Installed MongoDB" msg_ok "Installed MongoDB"
msg_info "Installing UniFi Network Server" msg_info "Installing UniFi Network Server"
curl -fsSL "https://dl.ui.com/unifi/unifi-repo.gpg" -o "/usr/share/keyrings/unifi-repo.gpg"
cat <<EOF | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.sources >/dev/null
Types: deb
URIs: https://www.ui.com/downloads/unifi/debian
Suites: stable
Components: ubiquiti
Architectures: amd64
Signed-By: /usr/share/keyrings/unifi-repo.gpg
EOF
$STD apt update
$STD apt install -y unifi $STD apt install -y unifi
msg_ok "Installed UniFi Network Server" msg_ok "Installed UniFi Network Server"