Update unifi-os-server-vm.sh
This commit is contained in:
parent
7b2c9bf770
commit
1889d3a5a2
@ -673,12 +673,12 @@ msg_info "Configuring Cloud-Init with UniFi OS installation"
|
|||||||
setup_cloud_init "$VMID" "$STORAGE" "$HN" "yes" >/dev/null 2>&1
|
setup_cloud_init "$VMID" "$STORAGE" "$HN" "yes" >/dev/null 2>&1
|
||||||
|
|
||||||
# Inject custom user-data for UniFi OS installation
|
# Inject custom user-data for UniFi OS installation
|
||||||
qm set "$VMID" --cicustom "user=local:snippets/unifi-os-${VMID}-user-data.yaml" >/dev/null 2>&1 || {
|
# First, ensure snippets directory exists and copy user-data file
|
||||||
# Fallback: Create snippets directory and upload user-data
|
mkdir -p /var/lib/vz/snippets
|
||||||
mkdir -p /var/lib/vz/snippets
|
cp user-data.yaml "/var/lib/vz/snippets/unifi-os-${VMID}-user-data.yaml"
|
||||||
cp user-data.yaml "/var/lib/vz/snippets/unifi-os-${VMID}-user-data.yaml"
|
|
||||||
qm set "$VMID" --cicustom "user=local:snippets/unifi-os-${VMID}-user-data.yaml" >/dev/null
|
# Now configure VM to use custom user-data
|
||||||
}
|
qm set "$VMID" --cicustom "user=local:snippets/unifi-os-${VMID}-user-data.yaml" >/dev/null 2>&1
|
||||||
|
|
||||||
msg_ok "Cloud-Init configured with automated UniFi OS installation"
|
msg_ok "Cloud-Init configured with automated UniFi OS installation"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user