fix local message refresh (#908)

This commit is contained in:
Steve 2023-08-14 23:53:38 -06:00 committed by GitHub
parent 7c158eac3e
commit 8ce7c0b27d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -82,6 +82,7 @@ fi
# are local alerts enabled? uci: aredn.alerts.localpath != NULL
alertslocalpath=$(uci -q get aredn.@alerts[0].localpath)
if [ -n "$alertslocalpath" ]; then
cat /dev/null > /tmp/local_message # initialize local_message file
# try node specific message file
retrieve_alert "${alertslocalpath}/${nodename}.txt" "${nodename}-alert" "${nodename}" &&
@ -105,7 +106,6 @@ if [ -n "$alertslocalpath" ]; then
# combine all files
if [ -n "$FILES" ];then
cat /dev/null > /tmp/local_message
for FILE in $FILES; do
cat /tmp/${FILE}-alert >> /tmp/local_message
rm /tmp/${FILE}-alert