Re: want to start apache when server boot up HELP HELP

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

 



Virus,

On Aug 19, 2007, at 12:34 PM, Galaxy Virus wrote:

I couldnt. Although I replaced the necessary path for every PREFIX, httpd didnt wakeup when server boots up. :(

The problem is actually very simple. When FreeBSD boots, it calls every executable script in /usr/local/etc/rc.d with the argument "start". When the system shuts down cleanly, the same scripts are invoked with the argument "stop".

You could put a short script in that directory that simply calls / path/to/your/apache/bin/httpd -k $1 , and you're done. The -k argument tells Apache to interpret the following as start/stop/ restart/graceful command, and $1 sucks in the first parameter on the command line.

The work of writing that script has actually been done for you already: you could put a symlink to the apachectl script in that directory. apachectl Responds to start and stop, so that gets you what you want.

S.

--
Sander Temme
sctemme@xxxxxxxxxx
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux