diff options
Diffstat (limited to 'src/modules/octopi/start_chroot_script')
-rwxr-xr-x | src/modules/octopi/start_chroot_script | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/octopi/start_chroot_script b/src/modules/octopi/start_chroot_script index 38d3f69..1b905a8 100755 --- a/src/modules/octopi/start_chroot_script +++ b/src/modules/octopi/start_chroot_script @@ -227,6 +227,15 @@ fi if [ "$OCTOPI_INCLUDE_HAPROXY" == "yes" ] then systemctl_if_exists enable gencert.service + + haproxy_version=$(dpkg -s haproxy | grep '^Version:' | awk '{print $2}') + if [[ $haproxy_version = 2.* ]]; then + mv /etc/haproxy/haproxy.2.x.cfg /etc/haproxy/haproxy.cfg + rm /etc/haproxy/haproxy.1.x.cfg + else + mv /etc/haproxy/haproxy.1.x.cfg /etc/haproxy/haproxy.cfg + rm /etc/haproxy/haproxy.2.x.cfg + fi else # let's remove the configs for system services we don't need rm /etc/systemd/system/gencert.service |