Update unifi-os.sh

This commit is contained in:
2026-02-21 18:23:13 +01:00
parent d05446a96e
commit 1833a68cfd

View File

@@ -292,6 +292,35 @@ write_files:
UNIFI_JVM_INIT_HEAP_SIZE=1024M
UNIFI_JVM_MAX_HEAP_SIZE=2048M
- path: /usr/local/sbin/install-unifi.sh
permissions: "0755"
content: |
#!/usr/bin/env bash
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y ca-certificates apt-transport-https wget gnupg
# Repo UniFi (source officielle)
echo 'deb [ arch=amd64,arm64 ] https://www.ui.com/downloads/unifi/debian stable ubiquiti' \
> /etc/apt/sources.list.d/100-ubnt-unifi.list
# GPG key (méthode recommandée officielle)
wget -qO /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
# Certains cas nécessitent d'accepter un changement ReleaseInfo
apt-get update --allow-releaseinfo-change || apt-get update
# (Optionnel mais utile en VM headless) Entropie
apt-get install -y haveged || true
systemctl enable --now haveged || true
# Installation UniFi Network Application
apt-get install -y unifi
systemctl enable --now unifi
runcmd:
@@ -312,14 +341,9 @@ runcmd:
# Agent Proxmox
- systemctl enable qemu-guest-agent || true
- systemctl start qemu-guest-agent || true
# Install UNIFI OS
- curl -fsSL https://dl.ui.com/unifi/unifi-repo.gpg | gpg --dearmor -o /usr/share/keyrings/unifi.gpg
- echo "deb [signed-by=/usr/share/keyrings/unifi.gpg] https://www.ui.com/downloads/unifi/debian stable ubiquiti" > /etc/apt/sources.list.d/100-ubnt-unifi.list
- apt-get update
- apt-get install -y unifi
- systemctl enable unifi
- systemctl start unifi
# Install UNIFI
- /usr/local/sbin/install-unifi.sh
EOF