From 171723a7d3a4319f4c1cb8664a40d46a99308b11 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sun, 19 Oct 2025 15:56:31 +0000 Subject: [PATCH] fix: automatically restart container when proxy mount is configured Instead of warning the user to restart the container manually, the script now automatically restarts it when the socket mount configuration is updated. This ensures the mount is immediately active and temperature monitoring works right away without user intervention. Uses 'pct restart' if running, 'pct start' if stopped. --- scripts/install-sensor-proxy.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh index a59e814..3bd2ec7 100755 --- a/scripts/install-sensor-proxy.sh +++ b/scripts/install-sensor-proxy.sh @@ -801,15 +801,13 @@ fi # Restart container to apply mount if configuration changed or mount missing if [[ "$MOUNT_UPDATED" = true ]]; then + print_info "Restarting container to apply socket mount..." if [[ "$CT_RUNNING" = true ]]; then - print_warn "Container $CTID is currently running. Restart it when convenient to activate the secure proxy mount." + pct restart "$CTID" else - print_info "Restarting container to apply socket mount..." - pct stop "$CTID" || true - sleep 2 pct start "$CTID" - sleep 5 fi + sleep 5 fi # Verify socket directory and file inside container