Skip to content

Commit

Permalink
Changed inotify if cerets dir exists or not
Browse files Browse the repository at this point in the history
  • Loading branch information
acaranta committed Apr 21, 2021
1 parent 51f5d54 commit 59962b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inotifreload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ while true; do
fi
#start an inotifywait (timeout -s <#> seconds)
# inotifywait -t 10 -q -e close_write,moved_to,create /hacfg/$HASVC 2>&1 >/dev/null
inotifywait -t 10 -q -e close_write,moved_to,create -r /hacfg/$HASVC /hacfg/certs 2>&1 >/dev/null
if [ -d /hacfg/certs ]; then
inotifywait -t 10 -q -e close_write,moved_to,create -r /hacfg/$HASVC /hacfg/certs 2>&1 >/dev/null
else
inotifywait -t 10 -q -e close_write,moved_to,create /hacfg/$HASVC 2>&1 >/dev/null
fi

#If the config or certificate store did not really change don't do anything
diff /hacfg/$HASVC /etc/haproxy/$HASVC 2>&1 >/dev/null
Expand Down

0 comments on commit 59962b1

Please sign in to comment.