Update unifi-os.sh
This commit is contained in:
29
unifi-os.sh
29
unifi-os.sh
@@ -177,7 +177,7 @@ msg_ok "Image téléchargée"
|
||||
# -----------------------------
|
||||
# Create VM
|
||||
# -----------------------------
|
||||
msg_info "Création VM (pas d'autostart)"
|
||||
msg_info "Création VM"
|
||||
qm create "$VMID" \
|
||||
-name "$HN" \
|
||||
-cores "$CORE_COUNT" \
|
||||
@@ -290,6 +290,16 @@ write_files:
|
||||
GRUB_GFXMODE=1920x1080
|
||||
GRUB_GFXPAYLOAD_LINUX=keep
|
||||
|
||||
- path: /root/uos/install.exp
|
||||
permissions: "0755"
|
||||
content: |
|
||||
set timeout -1
|
||||
spawn ./uos-installer.bin
|
||||
expect {
|
||||
-re {Proceed\?\s*\(y/N\):} { send "y\r"; exp_continue }
|
||||
eof
|
||||
}
|
||||
|
||||
runcmd:
|
||||
# Réseau: petite attente (DHCP)
|
||||
- bash -lc 'for i in {1..30}; do ping -c1 1.1.1.1 >/dev/null 2>&1 && break; sleep 2; done'
|
||||
@@ -308,6 +318,7 @@ runcmd:
|
||||
|
||||
# Root unlock (Debian cloud) + s'assurer que le mot de passe est bien actif
|
||||
- passwd -u root || true
|
||||
- echo "root:root" | chpasswd
|
||||
|
||||
# Agent Proxmox
|
||||
- systemctl enable qemu-guest-agent || true
|
||||
@@ -316,16 +327,9 @@ runcmd:
|
||||
# --- UniFi OS Server (uosserver) ---
|
||||
# Procédure officielle: installer podman+slirp4netns, télécharger l'installeur, chmod +x, exécuter, puis systemctl enable/start uosserver.
|
||||
- bash -lc 'set -e; mkdir -p /root/uos && cd /root/uos && curl -fL -o uos-installer.bin "https://fw-download.ubnt.com/data/unifi-os-server/1856-linux-x64-5.0.6-33f4990f-6c68-4e72-9d9c-477496c22450.6-x64"'
|
||||
- bash -lc 'set -e; cd /root/uos && chmod +x uos-installer.bin'
|
||||
- bash -lc 'set -e; cd /root/uos && expect <<'\''EOF'\''
|
||||
set timeout -1
|
||||
spawn ./uos-installer.bin
|
||||
expect {
|
||||
-re {Proceed\?\s*\(y/N\):} { send "y\r"; exp_continue }
|
||||
eof
|
||||
}
|
||||
EOF'
|
||||
- systemctl enable --now uosserver
|
||||
- bash -lc 'set -e; cd /root/uos && expect /root/uos/install.exp | tee /root/uos/uos-install.log || true'
|
||||
- systemctl enable --now uosserver || true
|
||||
- systemctl status uosserver --no-pager -l || true
|
||||
- systemctl start uosserver
|
||||
EOF
|
||||
|
||||
@@ -400,8 +404,5 @@ fi
|
||||
|
||||
echo
|
||||
echo "Commandes utiles :"
|
||||
echo " qm config ${VMID} | egrep 'name:|net0|ipconfig0|ciuser|cipassword|vga|scsi0|scsi1|serial0'"
|
||||
echo " qm cloudinit dump ${VMID} user"
|
||||
echo " qm cloudinit dump ${VMID} network"
|
||||
echo " Dans la VM: systemctl status uosserver"
|
||||
echo " Dashboard: https://<IP_VM>:11443"
|
||||
Reference in New Issue
Block a user