From 8ce7c0b27d4e4fc2b6d1801c040b7686fdc77da0 Mon Sep 17 00:00:00 2001 From: Steve <69524416+ab7pa@users.noreply.github.com> Date: Mon, 14 Aug 2023 23:53:38 -0600 Subject: [PATCH] fix local message refresh (#908) --- files/usr/local/bin/aredn_message.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/usr/local/bin/aredn_message.sh b/files/usr/local/bin/aredn_message.sh index 335f8da4..472e29a4 100755 --- a/files/usr/local/bin/aredn_message.sh +++ b/files/usr/local/bin/aredn_message.sh @@ -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