We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d4cd57 commit 1ad955fCopy full SHA for 1ad955f
1 file changed
src/modules/octopi/start_chroot_script
@@ -279,12 +279,13 @@ then
279
systemctl_if_exists enable gencert.service
280
281
haproxy_version=$(dpkg -s haproxy | grep '^Version:' | awk '{print $2}')
282
- if [[ $haproxy_version = 2.* ]]; then
283
- mv /etc/haproxy/haproxy.2.x.cfg /etc/haproxy/haproxy.cfg
284
- rm /etc/haproxy/haproxy.1.x.cfg
285
- else
+ # Use 1.x config only for HAProxy 1.x, otherwise use 2.x+ config (works for 2.x, 3.x+)
+ if [[ $haproxy_version = 1.* ]]; then
286
mv /etc/haproxy/haproxy.1.x.cfg /etc/haproxy/haproxy.cfg
287
rm /etc/haproxy/haproxy.2.x.cfg
+ else
+ mv /etc/haproxy/haproxy.2.x.cfg /etc/haproxy/haproxy.cfg
288
+ rm /etc/haproxy/haproxy.1.x.cfg
289
fi
290
else
291
# let's remove the configs for system services we don't need
0 commit comments