top of page
Search

Clam av scan script

  • knowledgediary4min
  • Mar 3, 2020
  • 1 min read

#!/usr/bin/env bash

# After you configure ClamAV, we recommend that you schedule a root cron job to run daily during off-peak hours. The following example demonstrates a command that will scan the server's accounts:

# Enable ClamAV

/scripts/update_local_rpm_versions --edit target_settings.clamav installed

/scripts/check_cpanel_rpms --fix --targets=clamav

# Update ClamAV

/usr/local/cpanel/3rdparty/bin/freshclam

# Loop through all accounts:

while read domain user; do echo -e "\n$user" ; /usr/local/cpanel/3rdparty/bin/clamscan -i -r /home/"$user" 2>&1; done </etc/trueuserdomains >>/root/infections-$(date +"%d_%m_%Y").txt

# Send report once done:

/usr/bin/mail -s "ClamAV scan for $(hostname) on $(date +"%d_%m_%Y")" support@reversedelta.com < /root/infections-$(date +"%d_%m_%Y").txt

# Done

 
 
 

Recent Posts

See All
clear script

#!/bin/bash rm -f ./cleanspace.sh bold=$(tput bold) normal=$(tput sgr0) TIMESTAMP=$(date +%d-%m-%Y-%H-%M) LOGFILE="/root/cleardisk-$TIME...

 
 
 
innodb restore

Create a new folder: mkdir /var/lib/mysql2 From R1: Restore from the /var/lib/mysql folder: + The folder which is called the db name...

 
 
 
Scripts

#not wordpress site grep shop2vizag.com /var/log/messages | awk '{print $6}' | cut -d: -f1 |sort -n |uniq -c |sort -n #Domains using...

 
 
 

Comments


  • White Facebook Icon
  • White Twitter Icon
  • White Instagram Icon
  • White YouTube Icon

© 2023 by Knowledge4mind. Proudly created with Wix.com

bottom of page