Skip to content
Snippets Groups Projects
Verified Commit ba4c94a3 authored by David Beniamine's avatar David Beniamine
Browse files

Better rkhunter / clamav

parent 81d93b90
Branches
Tags
No related merge requests found
...@@ -24,6 +24,8 @@ then ...@@ -24,6 +24,8 @@ then
echo "Please update your main.env" echo "Please update your main.env"
exit 1 exit 1
fi fi
# Base system update
aptitude update aptitude update
if [ "$MAINTENANCE_LEVEL" == "upgrade" ] if [ "$MAINTENANCE_LEVEL" == "upgrade" ]
then then
...@@ -31,6 +33,8 @@ then ...@@ -31,6 +33,8 @@ then
else else
unattended-upgrade unattended-upgrade
fi fi
# Update modules
for mod in $MODS for mod in $MODS
do do
script="$DIR/upgrade$mod.sh" script="$DIR/upgrade$mod.sh"
...@@ -44,6 +48,8 @@ if [ -f "$customfile" ] ...@@ -44,6 +48,8 @@ if [ -f "$customfile" ]
then then
/bin/bash $customfile /bin/bash $customfile
fi fi
# Check rootkits and antivirus
if [ -z "`which rkhunter`" ] if [ -z "`which rkhunter`" ]
then then
aptitude install rkhunter aptitude install rkhunter
...@@ -54,8 +60,17 @@ then ...@@ -54,8 +60,17 @@ then
systemctl restart ssh systemctl restart ssh
echo "Please retest ssh connexion before exiting this session" echo "Please retest ssh connexion before exiting this session"
fi fi
rkhunter --update
rkhunter --propupdate
rkhunter --sk -c rkhunter --sk -c
if [ `crontab -l | grep -c "clamav-weekly"` -eq 0 ]
then
echo -e "\tERROR : clamav weekly not installed"
else
less /var/log/clamav.log less /var/log/clamav.log
fi
# Restart services
services="`checkrestart | awk '/^service/{print $2} /^systemctl/{print $3}'` \ services="`checkrestart | awk '/^service/{print $2} /^systemctl/{print $3}'` \
$EXTRAS_SERVICES_TO_RESTART" $EXTRAS_SERVICES_TO_RESTART"
[ ! -z "$services" ] && systemctl restart $services [ ! -z "$services" ] && systemctl restart $services
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment