From bc3733c8e96b37e961f5f393a3150edf57efc164 Mon Sep 17 00:00:00 2001 From: paukstelis Date: Fri, 20 Jan 2023 18:13:52 -0500 Subject: [PATCH] fix haproxy --- octoprint_deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octoprint_deploy.sh b/octoprint_deploy.sh index 224bdac..f7bb02c 100755 --- a/octoprint_deploy.sh +++ b/octoprint_deploy.sh @@ -375,7 +375,7 @@ write_camera() { echo SUBSYSTEM==\"video4linux\",KERNELS==\"$USBCAM\", SUBSYSTEMS==\"usb\", ATTR{index}==\"0\", DRIVERS==\"uvcvideo\", SYMLINK+=\"cam${INUM}_$INSTANCE\" >> /etc/udev/rules.d/99-octoprint.rules fi - if [ -n $CAMHAPROXY ]; then + if [ -n "$CAMHAPROXY" ]; then HAversion=$(haproxy -v | sed -n 's/^.*version \([0-9]\).*/\1/p') #find frontend line, do insert sed -i "/option forwardfor except 127.0.0.1/a\ use_backend cam${INUM}_$INSTANCE if { path_beg /cam${INUM}_$INSTANCE/ }" /etc/haproxy/haproxy.cfg