Scheduled Downtime via Cron
nagios at acmecargo.com
nagios at acmecargo.com
Wed Jan 7 17:19:12 CET 2004
When I open the file in vi I do not get the ^M. I only show that when I do
a cat -A. So I took your advice and copied the text from a vi session to
notepad, moved the old file, created a new file with vi and pasted the
clear text into the new file. chmod 755 and wala! Now I'm making sure the
syntax is correct before I schedule my cron. Thank you Phil!
Dylan
At 05:13 AM 1/7/2004, you wrote:
> > From: nagios at acmecargo.com [mailto:nagios at acmecargo.com]
> > At 05:01 PM 1/6/2004, you wrote:
> > >On Mon, Jan 05, 2004 at 06:13:41PM -0500, nagios at acmecargo.com wrote:
> > > > [root at host]#
> > /usr/local/nagios/libexec/schedule_host_downtime host
> > > > "`date --iso-8601` 05:00:00" "`date --iso-8601` 06:00:00" 1 3600
> > > > cron "scheduled maintenance"
> > > > : bad interpreter: No such file or directoryst_downtime: /bin/sh
> > >
> > >Maybe you should check both, the script and your crontab with cat -A
> > >for dubious whitespaces.
> >
> > None that I can see in the script. I simply did a wget from
> > the web page
> > it's hosted on so it should be in it's original format.
>
>Failing to find the interpreter is a classic symptom of trying to run a
>shell script in DOS file format. If you open the script using vi and
>every line ends ^M, that's the problem.
>
>Phil
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
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