fix: replace tr/head password gen with openssl rand to avoid SIGPIPE killing script under set -o pipefail

This commit is contained in:
Pouzor
2026-03-09 23:50:03 +01:00
parent 5ae8fb242c
commit cae745e7d8
+1 -1
View File
@@ -41,7 +41,7 @@ RAM="${RAM:-1024}" # MB
CORES="${CORES:-2}"
BRIDGE="${BRIDGE:-vmbr0}"
RAW="https://raw.githubusercontent.com/Pouzor/homelable/main"
ROOT_PASSWORD="${ROOT_PASSWORD:-$(tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 16)}"
ROOT_PASSWORD="${ROOT_PASSWORD:-$(openssl rand -base64 12 | tr -d '+/=')}"
step "Creating Homelable LXC (CTID=$CTID, hostname=$CT_HOSTNAME, storage=$STORAGE)"