If you set it up as I suggested, it is the first to process any log message, and because there is no final flag, the message falls to the rest of the configs, in alphabetic order, and if it isn't pulled out by one of them, to messages. If it is pulled out to the skynet-0 log file (likely), then skynet will operate on it. When skynet purges the log, the documentation says it deletes the hourly message too. Then it writes a new hourly summary that ends up in the skynet-0 log. That doesn't happen to me, but I'm skipping some hourly messages.Me too, and still getting Skynet hourly [save] lines in Loggy, just nowhere on my router that I can find.
I know they have to be *somewhere* or they would never get sent to Loggly. I just have no idea where.
The clue has to be here:
Code:
Purge_Logs () {
sed '\~BLOCKED -~!d' "$syslog1loc" "$syslogloc" 2>/dev/null >> "$skynetlog"
sed -i '\~BLOCKED -~d' "$syslog1loc" "$syslogloc" 2>/dev/null
if [ "$(du "$skynetlog" | awk '{print $1}')" -ge "10240" ]; then
sed -i '\~BLOCKED -~d' "$skynetlog"
sed -i '\~Skynet: \[#\] ~d' "$skynetevents"
if [ "$(du "$skynetlog" | awk '{print $1}')" -ge "3000" ]; then
true > "$skynetlog"
fi
fi
if [ "$1" = "all" ] || [ "$(grep -cE "Skynet: [#] " "$syslogloc" 2>/dev/null)" -gt "24" ] 2>/dev/null; then
sed '\~Skynet: \[#\] ~!d' "$syslog1loc" "$syslogloc" 2>/dev/null >> "$skynetevents"
sed -i '\~Skynet: \[#\] ~d;\~Skynet: \[i\] ~d;\~Skynet: \[\*\] Lock ~d' "$syslog1loc" "$syslogloc" 2>/dev/null
fi
}
Then it looks at the size of the skynet log, and if it is more than 10240 kilobytes, it deletes all the BLOCKED lines from the skynet log. Then it deletes all the Skynet: messages from the events log, which would include the hourlies. If the size of the log is more than 3000 kilobytes, it just exits.
@Adamm, care to take pity on @Butterfly Bones and me?
Last edited: