Skip to content

Commit

Permalink
Generate stats before purging logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamm00 committed Apr 19, 2020
1 parent 1a305d1 commit 1597f75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion firewall.sh
Expand Up @@ -10,7 +10,7 @@
# #
# Router Firewall And Security Enhancements #
# By Adamm - https://github.com/Adamm00/IPSet_ASUS #
# 16/04/2020 - v7.1.6 #
# 19/04/2020 - v7.1.6 #
#############################################################################################################


Expand Down Expand Up @@ -1276,6 +1276,7 @@ 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" ] || [ "$1" = "force" ]; then
Generate_Stats
sed -i '\~BLOCKED -~d' "$skynetlog"
sed -i '\~Skynet: \[#\] ~d' "$skynetevents"
iptables -Z PREROUTING -t raw
Expand Down

0 comments on commit 1597f75

Please sign in to comment.