Compare commits

...

2 Commits

View File

@@ -292,6 +292,35 @@ write_files:
UNIFI_JVM_INIT_HEAP_SIZE=1024M UNIFI_JVM_INIT_HEAP_SIZE=1024M
UNIFI_JVM_MAX_HEAP_SIZE=2048M 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: runcmd:
@@ -313,13 +342,8 @@ runcmd:
- systemctl enable qemu-guest-agent || true - systemctl enable qemu-guest-agent || true
- systemctl start qemu-guest-agent || true - systemctl start qemu-guest-agent || true
# Install UNIFI OS # Install UNIFI
- curl -fsSL https://dl.ui.com/unifi/unifi-repo.gpg | gpg --dearmor -o /usr/share/keyrings/unifi.gpg - /usr/local/sbin/install-unifi.sh
- 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
EOF EOF