That did it!

Thanks Gene and everyone who chimed in on this. It was the full path on
apachectl that was causing the issue.

This works great for anyone looking for an easy solution to roll your logs.

#!/bin/sh

mv /var/log/httpd/access_log /users/admin/logs/
/usr/sbin/apachectl restart

---------------------------------------
Jeremy Schwartz                Starmark
Interactive Developer
[EMAIL PROTECTED]        954-761-1600

> From: gene <[EMAIL PROTECTED]>
> Date: Tue, 26 Nov 2002 12:01:31 -0800
> To: Jeremy Schwartz <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: Re: Restart Apache
> 
> 
> On Tuesday, November 26, 2002, at 11:55  AM, Jeremy Schwartz wrote:
> 
>> I am trying to rotate my Apache logs using Cron and the following shell
>> script:
>> 
>> # /bin/sh
>> 
>> mv /var/log/httpd/access_log /users/admin/logs/
>> apachectl restart
>> 
>> This script is set to 755 and is being executed by the root crontab.
>> The
>> first line is executing correctly, the log file is moving out of
>> /var/log/httpd/ to /users/admin/logs/ but apache is not restarting.
>> 
> 
> My first guess is that apachectl is not in the path for the script.
> Try putting in the full path for apachectl.
> 
> If that still doesn't work, have you checked the error log for apache
> to see if it's dying on startup??
> 
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to