fix haproxy2

This commit is contained in:
paukstelis
2022-12-23 16:41:53 -05:00
parent d06e031066
commit 526b0bee98

View File

@@ -375,7 +375,7 @@ write_camera() {
echo "#cam_$INSTANCE start" >> /etc/haproxy/haproxy.cfg
echo "backend cam_$INSTANCE" >> /etc/haproxy/haproxy.cfg
if [ $HAversion -gt 1 ]; then
echo " reqrep ^([^\ :]*)\ /cam_$INSTANCE/(.*) \1\ /\2" >> /etc/haproxy/haproxy.cfg
echo " http-request replace-path /cam_$INSTANCE/(.*) /\1" >> /etc/haproxy/haproxy.cfg
echo " server webcam1 127.0.0.1:$CAMPORT" >> /etc/haproxy/haproxy.cfg
else
echo " reqrep ^([^\ :]*)\ /cam_$INSTANCE/(.*) \1\ /\2" >> /etc/haproxy/haproxy.cfg