View Single Post
Old 15th January 2008, 06:48
djtremors djtremors is offline
Senior Member
Join Date: Apr 2006
Location: Sydney
Posts: 278
Thanks: 0
Thanked 12 Times in 10 Posts


Thanks for the update. I'll add the the first part to my script to make sure the path exists. My mistake again.

The reason I don't use the :
#!/usr/bin/php -q

at the top is because sometimes people have their php elsewhere which then breaks their script and they have to modify it.<edit>could use /root/ispconfig/php/bin/php which everyone should have, i used typical functions to keep it simple so should work. let me know your thoughts</edit>
So I usually prefer that they use their own call in crontab and let it find their own path :
PHP Code:
10 * * * * root php /root/clamavupdate.php 
this way no need to use `which php` or anything. up to the user really.

Also, haven't you just complicated the install a bit too much?
All they need to do is....
PHP Code:
wget -O /root/clamavupdate.php 
and then put their email in the file, then do a test run `php /root/clamavupdate.php` and if all is well, add it to their crontab.
PHP Code:
# Redhat/Centos
echo "35 */3 * * * root php /root/clamavupdate.php" >> /var/spool/cron/root

# Debian/ubuntu (I think, make sure you check yours)
echo "35 */3 * * * root php /root/clamavupdate.php" >> /var/spool/cron/crontabs/root

# etc. 
thanks for the input...
__________________ for ISPConfig mods/hacks

Last edited by djtremors; 15th January 2008 at 07:24.
Reply With Quote