fix: setup script now configures proxy socket bind mount

The setup script was restarting the container but never running the
pct set command to configure the bind mount. This meant the socket
was never accessible inside the container.

Now runs: pct set <ctid> -mp0 /run/pulse-sensor-proxy,mp=/mnt/pulse-proxy
before restarting the container to ensure the mount is configured.
This commit is contained in:
rcourtman 2025-10-17 14:25:30 +00:00
parent 65b696f2d6
commit d0f7fd6404

View file

@ -3707,6 +3707,11 @@ if [ "$PULSE_IS_CONTAINERIZED" = true ] && [ -n "$PULSE_CTID" ]; then
echo "" echo ""
if [[ $RESTART_CONTAINER =~ ^[Yy]$|^$ ]]; then if [[ $RESTART_CONTAINER =~ ^[Yy]$|^$ ]]; then
echo "Configuring socket bind mount for container $PULSE_CTID..."
# Configure bind mount for proxy socket
pct set "$PULSE_CTID" -mp0 /run/pulse-sensor-proxy,mp=/mnt/pulse-proxy
echo "Restarting container $PULSE_CTID..." echo "Restarting container $PULSE_CTID..."
# Set up trap to restart container even if script is interrupted # Set up trap to restart container even if script is interrupted
@ -3722,8 +3727,9 @@ if [ "$PULSE_IS_CONTAINERIZED" = true ] && [ -n "$PULSE_CTID" ]; then
echo " ✓ Container restarted successfully" echo " ✓ Container restarted successfully"
echo "" echo ""
else else
echo "⚠️ Remember to restart container $PULSE_CTID manually:" echo "⚠️ Remember to configure the bind mount and restart container $PULSE_CTID manually:"
echo " pct restart $PULSE_CTID" echo " pct set $PULSE_CTID -mp0 /run/pulse-sensor-proxy,mp=/mnt/pulse-proxy"
echo " pct stop $PULSE_CTID && sleep 2 && pct start $PULSE_CTID"
echo "" echo ""
fi fi
else else