Here's one that does work:
For your purposes, you'd edit the log location to
(possibly changing "access_log" to "*_log" to catch both the access_log
You would edit the /etc/rc.d/rc.httpd restart
to your system's actual start up program (the one that executes at boot) if it includes the restart
directive, or simply to edit the apachectl
line, adding the -k
/usr/local/apache2/bin/apachectl -k restart > /dev/null 2>&1
You most likely do not need
if [ -f /usr/local/apache2/logs/httpd.pid ];then
sudo -u reto ./usr/local/Misc/Start_Stream.sh > /dev/null 2>&1
If you have a special purpose for those, leave them in place but do the following.
See Stopping and Restarting
; essentially, the -k
option sends a TERM signal to the running process causing it to kill off all of its children. Can't hurt, might help.
You might also want to change the size=5M
(which is a test for the log size being 5 megabytes) to some other value depending upon how large your logs get in a week.
Hope this helps some.