remove everything include haproxy

This commit is contained in:
paukstelis
2022-05-27 21:56:42 -04:00
parent 883a44e1e2
commit 1384b06faf

View File

@@ -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