[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache startup script in /etc/init.d



Didier Gehéniau wrote:
> 
> I found a "bug" in the startup script. We start and stop apache in a cron
> job to backup some files. In the startup script "start-stop-daemon" is used,
> this command is in "/sbin" in the PATH variable the "/sbin" directory is not
> there. Therefore when /etc/init.d/apache is run in an environment with no
> "/sbin" in the PATH the script will fail to run!

/sbin and /usr/sbin are expected to be in your path when you run init
scripts, as they're expected to be run as root.  If this isn't the case
in your setup, the bug lies elsewhere, not in apache.

(hint: you can set PATH at the top of your crontab)

... Adam



Reply to: