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