PLease help

Rob Moss robmossrm at aol.com
Tue Oct 11 18:34:50 CEST 2005


Forough, Hamid wrote:

>The problem is when I run this file directly from linux, I get the echo
>correctly and the files gets deleted. But when ran from Nagios, the echo
>gets returned BUT IT DOES NOT DELETE THE FILE. Do u know why?
>  
>
Probably because you're writing the file as root and the user nagios 
doesn't have the right permissions to delete the file..

rm -f      will silently fail deleting the file.

You can evaluate the rm command's error code $? to see if it's 0 
(success) or anything else (failed, reason code).

Cheers
rob



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list