net/haproxy: deploy haproxy.conf if it does not exist, fixes #2474

This commit is contained in:
Frank Wall
2021-10-07 23:51:41 +02:00
parent d3457c2620
commit 962a63310f
2 changed files with 13 additions and 0 deletions
+6
View File
@@ -11,6 +11,12 @@ Plugin Changelog
Added:
* add support for advanced resolver properties (#2330)
Fixed:
* no haproxy.conf after restoring a config backup (#2474)
Changed:
* deploy haproxy.conf if it does not exist (#2474)
3.5
Fixed:
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
# fallback if no config file exists (i.e. after config backup restore)
if [ ! -e /usr/local/etc/haproxy.conf -a -e /usr/local/etc/haproxy.conf.staging ]; then
cp /usr/local/etc/haproxy.conf.staging /usr/local/etc/haproxy.conf
/usr/local/etc/rc.d/haproxy start
fi