summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreemor <freemor@freemor.ca>2019-10-25 17:02:55 -0300
committerFreemor <freemor@freemor.ca>2019-10-25 17:02:55 -0300
commit1402267ccf099c9884c264b02cc2e9a17120e9c9 (patch)
tree7bb3a3aeebb2c9ce3575580e69e494f4e7161d0e
parent2f9f06fc4e96043a6d66b18b08f7a04a73858748 (diff)
Oh! fix that not working e-mail alert flag
-rwxr-xr-xtheDrain6
1 files changed, 3 insertions, 3 deletions
diff --git a/theDrain b/theDrain
index 34397f1..f148c22 100755
--- a/theDrain
+++ b/theDrain
@@ -44,13 +44,13 @@ number_of_ho=$(netstat -tn | grep SYN_RECV | wc -l) # Helps us to sp
# E-mail Alerts
if [[ "$number_of_ho" -gt "$alert_level" ]]; then
- if [[ "$ALERTED_FLAG" -ne "1" ]]; then
+ if [[ ! -e tmp/ALERTED_FLAG ]]; then
echo -e "$number_of_ho half open connections on Winston.\n \
Potential SYN Flood situation.\n \
Please checkwhat is going on.\n \
- Please clear ALERTED_FLAG when the situation is Resolved.\n\n \
+ Please clear /tmp/ALERTED_FLAG when the situation is Resolved.\n\n \
WInston" | mail -s "SYN Flood Warning" -t "$alert_to"
- export ALERTED_FLAG=1
+ touch /tmp/ALERTED_FLAG
fi
fi