| 1 | Install clamd |
| 2 | {{{ |
| 3 | emerge app-antivirus/clamav |
| 4 | }}} |
| 5 | Change /home/admispconfig/ispconfig/tools/clamav/bin/clamassassin |
| 6 | {{{ |
| 7 | #CLAMSCAN=/home/admispconfig/ispconfig/tools/clamav/bin/clamscan |
| 8 | CLAMSCAN=/usr/bin/clamdscan |
| 9 | }}} |
| 10 | Customize the config files: |
| 11 | |
| 12 | /etc/clamav.conf |
| 13 | {{{ |
| 14 | LogFile /var/log/clamav/clamd.log |
| 15 | LocalSocket /home/admispconfig/ispconfig/temp/clamd |
| 16 | MaxDirectoryRecursion 15 |
| 17 | User admispconfig |
| 18 | }}} |
| 19 | /etc/init.d/ispconfig_server (auskommentieren von freshclam) |
| 20 | {{{ |
| 21 | # if ps ax | grep -iw '/home/admispconfig/ispconfig/tools/clamav/bin/freshclam' | grep -iv 'grep' &> /dev/null ;then |
| 22 | # echo "FreshClam is already running!" |
| 23 | # else |
| 24 | # /home/admispconfig/ispconfig/tools/clamav/bin/freshclam -d -c 10 --datadir=/home/admispconfig/ispconfig/tools/clamav/share/clamav |
| 25 | # fi |
| 26 | ... |
| 27 | # array=(`ps ax | grep -iw '/home/admispconfig/ispconfig/tools/clamav/bin/freshclam' | grep -iv 'grep' | awk '{print $1}' | cut -f1 -d/ | tr '$ |
| 28 | # element_count=${#array[@]} |
| 29 | # index=0 |
| 30 | # while [ "$index" -lt "$element_count" ] |
| 31 | # do |
| 32 | # kill -9 ${array[$index]} |
| 33 | # let "index = $index + 1" |
| 34 | # done |
| 35 | }}} |
| 36 | /etc/freshclam.conf |
| 37 | |
| 38 | {{{ |
| 39 | UpdateLogFile /var/log/clamav/freshclam.log |
| 40 | LogSyslog 1 |
| 41 | LogFacility LOG_MAIL |
| 42 | OnUpdateExecute chmod -R 755 /home/admispconfig/ispconfig/tools/clamav/share/clamav |
| 43 | }}} |
| 44 | |
| 45 | Start the services |
| 46 | |
| 47 | {{{ |
| 48 | /etc/init.d/clamd restart |
| 49 | rc-update add clamd default |
| 50 | }}} |
| 51 | |