diff --git a/inc_haproxy_cfg.sh b/inc_haproxy_cfg.sh index 8aea4a43bf57e13cc7e8bf5022fa68623a139903..d497baa4d1952207fb4734c3b068cc07c38b7994 100755 --- a/inc_haproxy_cfg.sh +++ b/inc_haproxy_cfg.sh @@ -8,6 +8,7 @@ # 2021-12-14 v1.0 <axel.hahn@iml.unibe.ch> init # 2022-10-21 v1.1 <axel.hahn@unibe.ch> remove grep: warning: stray \ before white space # 2023-06-09 v1.2 <axel.hahn@unibe.ch> take first haproxy stats port on multiple binds +# 2023-07-28 v1.3 <axel.hahn@unibe.ch> check existance of file $HAPROXYcfgfile # ====================================================================== # full path to haproxy.cfg @@ -54,7 +55,7 @@ HAPROXYdoCache=0 function cfgrewriter(){ local _section= IFS='' - while read line + test -f $HAPROXYcfgfile && while read line do echo $line | grep "^[a-z]" >/dev/null if [ $? -eq 0 ]; then