Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 11-fail2ban
  • 133-fail2ban-page
  • 16-maintenace-service
  • 2-migrate-to-phpfpm
  • 6-monit-update
  • 6-surveillance-interne-des-serveur
  • 7-dolibarr-fail2ban
  • github
  • jessie
  • master
  • reorganisation
  • test-glpi
12 results

Target

Select target project
  • nocloud/NoCloud-Auto-Installer
1 result
Select Git revision
  • 11-fail2ban
  • 133-fail2ban-page
  • 16-maintenace-service
  • 2-migrate-to-phpfpm
  • 6-monit-update
  • 6-surveillance-interne-des-serveur
  • 7-dolibarr-fail2ban
  • github
  • jessie
  • master
  • reorganisation
  • test-glpi
12 results
Show changes
Commits on Source (3)
......@@ -54,14 +54,22 @@ fi
# install monit if not installed
if [ -z "$(dpkg -l | grep ' monit ')" ]; then
apt-get update && apt-get install -y monit
echo -e 'check device root with path /\n if SPACE usage > 75% then alert\nif SPACE usage > 75% timeout 86400 seconds then alert\n\ncheck device home with path /home\n if SPACE usage > 75% then alert\nif SPACE usage > 75% timeout 86400 seconds then alert' > /etc/monit/conf-available/disc
ln -s /etc/monit/conf-available/disc /etc/monit/conf-enabled/
sed -i 's/# set httpd/set httpd/' /etc/monit/monitrc
sed -i 's/^# allow localhost/ allow localhost/' /etc/monit/monitrc
echo -e "set mailserver 127.0.0.1\nset mail-format { from: Monit <monit@$DOMAIN>}\nset alert root@localhost" >> /etc/monit/monitrc
systemctl restart monit
fi
# Monit all partition without swap and boot
list_of_part=(`grep -v "#\|swap\|noauto" /etc/fstab | awk '{print $2}'`)
echo "" > ./$$-parts
for part in "${list_of_part[@]}"
do
echo -e "check device root with path $part\n if SPACE usage > 75% then alert\nif SPACE usage > 75% timeout 86400 seconds then alert\n\n" >> ./$$-parts
done
mv ./$$-parts /etc/monit/conf-available/disc
systemctl restart monit
# Check rootkits and antivirus
if [ `grep -c "^ALLOWHIDDENDIR=/etc/.java" /etc/rkhunter.conf` -eq 0 ]
then
......