View Single Post
  #24  
Old 14th January 2008, 15:08
MTvermoes MTvermoes is offline
Junior Member
 
Join Date: Dec 2007
Posts: 17
Thanks: 1
Thanked 10 Times in 5 Posts
Default

The following fixed it :
as root do :
Code:
mkdir /root/ispc.updates/clamav
chmod 777 /root/ispc.updates/clamav
allso
adding :
Code:
#!/usr/bin/php -q
as first line in the script.
then as root do :
Code:
chown root:root clamavupdate.php
chmod 755 clamavupdate.php
mv ./clamavupdate.php /usr/sbin/clamavupdate.php
then call the script once a week from cron

cat /etc/cron.weekly/clamavupdate.cron
Code:
#!/bin/bash
/usr/sbin/clamavupdate.php
exit 0
Perfect Setup....THX A LOT for the script.

--------------------------------------------------------
Setup script that installs the script and runs it once a week via cron :
cat /root/setup-clamupdate.sh
Code:
#!/bin/sh
cd /root
touch /var/log/clamav-fresh-update.log
chown admispconfig /var/log/clamav-fresh-update.log
mkdir /root/ispc.updates
mkdir /root/ispc.updates/clamav
chmod 777 /root/ispc.updates
chmod 777 /root/ispc.updates/clamav
wget http://www.djtremors.com/downloads/clamavupdate.php.txt -O clamavupdate.php.txt
cat <<EOF>>clamavupdate.php
#!/usr/bin/php -q
EOF
cat ./clamavupdate.php.txt>>clamavupdate.php
chown root:root clamavupdate.php
chmod 755 clamavupdate.php
mv ./clamavupdate.php /usr/sbin/clamavupdate.php
cat <<EOF>>/etc/cron.weekly/clamavupdate.cron
#!/bin/bash
/usr/sbin/clamavupdate.php
exit 0
EOF
chown root:root /etc/cron.weekly/clamavupdate.cron
chmod 755 /etc/cron.weekly/clamavupdate.cron
/usr/sbin/clamavupdate.php
Allso remember to change :
$conf['admin'] = "your-email@yourdomain.com";

in the script

vi /usr/sbin/clamavupdate.php

Have patience with the setup script...it will update clamav if needed (download compile,install)

/Mark

Last edited by MTvermoes; 14th January 2008 at 16:39.
Reply With Quote