From 13a4d0f6bb1e0063c8c949d010b697029a9e5b81 Mon Sep 17 00:00:00 2001 From: paukstelis Date: Tue, 21 Feb 2023 21:36:07 -0500 Subject: [PATCH] formatting --- octoprint_deploy.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/octoprint_deploy.sh b/octoprint_deploy.sh index 50b7040..34dd3e4 100755 --- a/octoprint_deploy.sh +++ b/octoprint_deploy.sh @@ -279,9 +279,9 @@ new_instance () { #Don't know how to do the formatting correctly here. This works, however. SEDREPLACE="#$INSTANCE start\n\ - acl is_$INSTANCE url_beg /$INSTANCE\n\ - http-request redirect scheme http drop-query append-slash if is_$INSTANCE ! { path_beg /$INSTANCE/ }\n\ - use_backend $INSTANCE if { path_beg /$INSTANCE/ }\n\ + acl is_$INSTANCE url_beg /$INSTANCE\n\ + http-request redirect scheme http drop-query append-slash if is_$INSTANCE ! { path_beg /$INSTANCE/ }\n\ + use_backend $INSTANCE if { path_beg /$INSTANCE/ }\n\ #$INSTANCE stop" sed -i "/option forwardfor except 127.0.0.1/a $SEDREPLACE" /etc/haproxy/haproxy.cfg @@ -400,7 +400,7 @@ EXTRACAM="backend cam${INUM}_$INSTANCE\n\ reqrep ^([^\ :]*)\ /cam${INUM}_$INSTANCE/(.*) \1\ /|\2 \n\ server webcam1 127.0.0.1:$CAMPORT" fi - + echo "#cam${INUM}_$INSTANCE start" >> /etc/haproxy/haproxy.cfg sed -i "/#cam${INUM}_$INSTANCE start/a $EXTRACAM" /etc/haproxy/haproxy.cfg #these are necessary because sed append seems to have issues with escaping for the /\1