From 73ca5531c05cab08d51b85b9a3ad5c573e22c336 Mon Sep 17 00:00:00 2001 From: alexandrev-tibco Date: Sat, 30 Aug 2025 10:27:39 +0200 Subject: [PATCH] +1 --- manage-lxc-vm-notes.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/manage-lxc-vm-notes.sh b/manage-lxc-vm-notes.sh index e77dcf6..6a031d2 100755 --- a/manage-lxc-vm-notes.sh +++ b/manage-lxc-vm-notes.sh @@ -155,7 +155,8 @@ update_notes() { pct exec "$vmid" -- sh -c "$enable_tailscale_check" echo "[INFO] Verificando configuración del Docker API y métricas en $type $vmid..." - pct exec "$vmid" -- sh -c 'DOCKER_WAIT_SECONDS='"${DOCKER_WAIT_SECONDS:-30}"'; \ + WAIT_SECS_HOST="${DOCKER_WAIT_SECONDS:-30}" + pct exec "$vmid" -- env DOCKER_WAIT_SECONDS="$WAIT_SECS_HOST" sh -c ' set -e mkdir -p /etc/docker DAEMON_JSON="/etc/docker/daemon.json" @@ -342,8 +343,9 @@ OVR docker_info="Sin contenedores" fi - # Formar nota - full_note=$(printf "# Notes:\n%s\n%s\n" "$tailscale_note" "$docker_info") + # Formar nota (todas las líneas comentadas para no romper el .conf) + docker_info_commented=$(printf "%s\n" "$docker_info" | sed "s/^/# /") + full_note=$(printf "# Notes:\n# %s\n%s\n" "$tailscale_note" "$docker_info_commented") # Añadir al archivo de configuración del contenedor conf_path="/etc/pve/lxc/${vmid}.conf"