diff --git a/files/www/cgi-bin/advancedconfig b/files/www/cgi-bin/advancedconfig index 1f178dbb..fa2c018c 100755 --- a/files/www/cgi-bin/advancedconfig +++ b/files/www/cgi-bin/advancedconfig @@ -154,7 +154,13 @@ push @setting, { desc => "Specifies the URL of the location from which local AREDN Alerts can be downloaded.", default => "" }; - +push @setting, { + key => "aredn.aam.purge", + type => "boolean", + desc => "Value doesn't matter. Will immediately purge/delete all AREDN (and local) Alerts from this node.", + default => "", + postcallback => "alert_purge()" +}; # ---------------------------------------- # ----- CONDITIONS ---------- @@ -199,6 +205,13 @@ sub aam_refresh() return $rc; } +sub alert_purge() +{ + unlink("/tmp/aredn_message"); + unlink("/tmp/local_message"); + return 0; +} + sub writePackageRepo { my $repo = @_[0]; my $uciurl = `uci get aredn.\@downloads[0].pkgs_$repo`;