mirror of https://github.com/aredn/aredn.git
fix local message refresh (#908)
This commit is contained in:
parent
7c158eac3e
commit
8ce7c0b27d
|
@ -82,6 +82,7 @@ fi
|
||||||
# are local alerts enabled? uci: aredn.alerts.localpath != NULL
|
# are local alerts enabled? uci: aredn.alerts.localpath != NULL
|
||||||
alertslocalpath=$(uci -q get aredn.@alerts[0].localpath)
|
alertslocalpath=$(uci -q get aredn.@alerts[0].localpath)
|
||||||
if [ -n "$alertslocalpath" ]; then
|
if [ -n "$alertslocalpath" ]; then
|
||||||
|
cat /dev/null > /tmp/local_message # initialize local_message file
|
||||||
|
|
||||||
# try node specific message file
|
# try node specific message file
|
||||||
retrieve_alert "${alertslocalpath}/${nodename}.txt" "${nodename}-alert" "${nodename}" &&
|
retrieve_alert "${alertslocalpath}/${nodename}.txt" "${nodename}-alert" "${nodename}" &&
|
||||||
|
@ -105,7 +106,6 @@ if [ -n "$alertslocalpath" ]; then
|
||||||
|
|
||||||
# combine all files
|
# combine all files
|
||||||
if [ -n "$FILES" ];then
|
if [ -n "$FILES" ];then
|
||||||
cat /dev/null > /tmp/local_message
|
|
||||||
for FILE in $FILES; do
|
for FILE in $FILES; do
|
||||||
cat /tmp/${FILE}-alert >> /tmp/local_message
|
cat /tmp/${FILE}-alert >> /tmp/local_message
|
||||||
rm /tmp/${FILE}-alert
|
rm /tmp/${FILE}-alert
|
||||||
|
|
Loading…
Reference in New Issue