LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-25-2009, 04:25 AM   #1
rob07mxa
LQ Newbie
 
Registered: Nov 2007
Posts: 19

Rep: Reputation: 0
on-error-execute freshclam clamav-0.95


hi

i am trying to lunch /var/log/freshclam.log when there is an error during updating the anti-virus database. therefore, i am trying to use the option –on-error-execute to open the above file.

i introduced an error by changing the location of one of the configuration file, the error get printed to the terminal, but the --on-error -execute did not open the log file.

# freshclam --on-error-execute=”gedit /var/log/freshclam.log”
ClamAV update process started at Thu Sep 24 17:38:55 2009
main.cvd is up to date (version: 51, sigs: 545035, f-level: 42, builder: sven)
daily.cld is up to date (version: 9833, sigs: 79627, f-level: 43, builder: mcichosz)
ERROR: SubmitDetectionStats: Can't open or parse configuration file /usr/local/etc/clamd.conf

enabling OnErrorExecute directive in freshclam.conf file also did not solve the problem.
# Run command when database update process fails.
# Default: disabled
OnErrorExecute command

entering a real command (/bin/pwd) instead of the command placeholder (a string without space):
OnErrorExecute/bin/pwd

and running freshclam without on-error-execute option
# freshclam
ClamAV update process started at Thu Sep 24 17:38:55 2009
main.cvd is up to date (version: 51, sigs: 545035, f-level: 42, builder: sven)
daily.cld is up to date (version: 9833, sigs: 79627, f-level: 43, builder: mcichosz)
ERROR: SubmitDetectionStats: Can't open or parse configuration file /usr/local/etc/clamd.conf

also did not solve the problem

Why on-error-execute option is not working when there is an error during database update?
What are the suggestions to make it work?


thanks
 
Old 10-01-2009, 03:41 AM   #2
arphaxad
LQ Newbie
 
Registered: May 2009
Location: United Kingdom
Distribution: Linux from scratch 6.3
Posts: 2

Rep: Reputation: 0
Having done a little testing, it seems as if the --on-error-execute
option will only run the specified command if the database update has failed (for example, because the update servers couldn't be reached or the files were corrupted) not if some other error has occurred. In your case, the update appears to have worked correctly; the error was that the SubmitDetectionStats directive in freshclam.conf was still pointing at the old file location.

I think --on-error-execute (and --on-update-execute and --on-outdated-execute and the corresponding directives in freshclam.conf) are aimed mainly at systems where the updating is automated by cron job, to warn the sys admin when the update has failed (or worked, or the clamav version is out of date)and the command executed would normally be a mail command.

Arphaxad
 
  


Reply

Tags
clamav


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't open /var/log/clamav/freshclam.log in append mode i_nomad Linux - Software 2 07-14-2009 05:06 AM
clam-av error while updating cvs files by freshclam Mr.J Linux - Server 1 08-14-2008 03:42 AM
clamav - freshclam micro_xii Linux - Newbie 6 11-29-2006 08:41 PM
ClamAV (Freshclam) config problem - cannot append to log file tp11235 Linux - Security 6 09-29-2006 03:54 PM
Clamav freshclam Tihi Linux - Software 3 03-23-2005 11:18 AM


All times are GMT -5. The time now is 03:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration