mirror of https://github.com/aredn/aredn.git
feature: add advanced config option to purge AREDN Alert (and local alert) messages (#76)
This commit is contained in:
parent
89f110866f
commit
4b86b4f02a
|
@ -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`;
|
||||
|
|
Loading…
Reference in New Issue