From 1384b06faf50f2758c0b7aa38ea29098152a1ee8 Mon Sep 17 00:00:00 2001 From: paukstelis Date: Fri, 27 May 2022 21:56:42 -0400 Subject: [PATCH] remove everything include haproxy --- octoprint_deploy.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/octoprint_deploy.sh b/octoprint_deploy.sh index 1295bca..3c2209b 100755 --- a/octoprint_deploy.sh +++ b/octoprint_deploy.sh @@ -830,6 +830,11 @@ remove_everything() { rm -rf /home/$user/.octoprint rm -rf /home/$user/OctoPrint systemctl daemon-reload + if [ -f /etc/haproxy/haproxy.cfg ]; then + sed -i "/use_backend $instance/d" /etc/haproxy/haproxy.cfg + sed -i "/#$instance start/,/#$instance stop/d" /etc/haproxy/haproxy.cfg + systemctl restart haproxy.service + fi fi