diff --git a/log-forward.rsc b/log-forward.rsc index ed2226f0..26a23761 100644 --- a/log-forward.rsc +++ b/log-forward.rsc @@ -62,11 +62,7 @@ :set LogForwardInclude [ $EitherOr $LogForwardInclude [] ]; :set LogForwardIncludeMessage [ $EitherOr $LogForwardIncludeMessage [] ]; - :local LogAll [ /log/find ]; - :local MaxId ($LogAll->([ :len $LogAll ] - 1)); - :local MaxNum [ $HexToNum $MaxId ]; :local LogForwardFilterLogForwardingCached [ $EitherOr [ $LogForwardFilterLogForwarding ] ("\$^") ]; - :foreach Message in=[ /log/find where (!(message="") and \ !(message~$LogForwardFilterLogForwardingCached) and \ !(topics~$LogForwardFilter) and !(message~$LogForwardFilterMessage)) or \ @@ -74,8 +70,7 @@ :set MessageVal [ /log/get $Message ]; :local Bullet "information"; - :local Current [ $HexToNum ($MessageVal->".id") ]; - :if ($Last < $Current && $Current <= $MaxNum) do={ + :if ($Last < [ $HexToNum ($MessageVal->".id") ]) do={ :local DupCount ($MessageDups->($MessageVal->"message")); :if ($MessageVal->"topics" ~ "(warning)") do={ :set Warning true; @@ -111,7 +106,8 @@ :set LogForwardRateLimit [ $MAX 0 ($LogForwardRateLimit - 1) ]; } - :set LogForwardLast $MaxId; + :local LogAll [ /log/find ]; + :set LogForwardLast ($LogAll->([ :len $LogAll ] - 1) ); } do={ :global ExitError; $ExitError $ExitOK [ :jobname ] $Err; } diff --git a/netwatch-dns.rsc b/netwatch-dns.rsc index 2edbdf8c..4172d28e 100644 --- a/netwatch-dns.rsc +++ b/netwatch-dns.rsc @@ -104,8 +104,7 @@ :foreach DohServer in=$DohServers do={ :if ([ :len ($DohServer->"doh-cert") ] > 0) do={ - :if ([ $CertificateAvailable ($DohServer->"doh-cert") "fetch" ] = false || \ - [ $CertificateAvailable ($DohServer->"doh-cert") "dns" ] = false) do={ + :if ([ $CertificateAvailable ($DohServer->"doh-cert") "dns" ] = false) do={ $LogPrint warning $ScriptName ("Downloading certificate failed, trying without."); } }