Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Nov 2002 15:12:14 -0800
From:      "Paul A. Scott" <pscott@skycoast.us>
To:        <freebsd-questions@freebsd.org>
Subject:   Re: .sh interactive ok, from crontab, not
Message-ID:  <BA069CCE.14B29%pscott@skycoast.us>
In-Reply-To: <5.1.1.6.2.20021124234729.02d7a030@mail.go2france.com>

next in thread | previous in thread | raw e-mail | index | archive | help

>> From: Len Conrad <LConrad@Go2France.com>
>> It works for me, and I suspect that it's working for you, too.
> 
> well, it's really not.  The crontab execution is trying to run the daemon
> even when the daemon shows up in "ps aux".

Well, it was just a guess. :) I tested against my 'named' daemon, using the
code you supplied and it works fine. What version of FreeBSD? Are you using
the 'stock' shell? Did you look at the output from grep to see what you get?
How about splitting the test onto more than one line so that you can echo
and then test the status code.

ps -aux | grep -i "^root.*master"
STATUS=$?
echo "got $STATUS"
if [ $STATUS = 0 ] ; then

That might tell you something if you get a status 2.

If you'd like, send me your exact script, and crontab entry; I'll test it
here.

Paul

-- 
Paul A. Scott
mailto:pscott@skycoast.us
http://skycoast.us/pscott/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BA069CCE.14B29%pscott>