NEW: aide scripts
This commit is contained in:
parent
6d5a9fc5f7
commit
230ff9ea7d
8
sh/aide-check.sh
Normal file
8
sh/aide-check.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
aide --check -r file:/var/log/aide-check.log
|
||||||
|
COUNT=$(egrep '(Added|Removed|Changed).*[0-9]' /var/log/aide-check.log | awk '{SUM+=$NF}; END {print SUM}')
|
||||||
|
if [ $COUNT -gt 0 ]; then
|
||||||
|
# changes detected
|
||||||
|
cat /var/log/aide-check.log | mailx -s "AIDE alert" -r security@your-domain.com -- yourself@your-domain.com
|
||||||
|
fi
|
||||||
|
|
5
sh/aide-update.sh
Normal file
5
sh/aide-update.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
aide -u
|
||||||
|
mv /var/lib/aide/{aide.db.gz,aide.db.previous.gz}
|
||||||
|
mv /var/lib/aide/{aide.db.new.gz,aide.db.gz}
|
||||||
|
aide -C
|
Loading…
Reference in New Issue
Block a user