Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Nov 1998 14:21:51 -0500
From:      Chris Johnson <cjohnson@palomine.net>
To:        Aaron Clow <aaronc@atari.cmj.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Apache autostart upon reboot
Message-ID:  <19981118142151.A19316@palomine.net>
In-Reply-To: <Pine.BSF.4.01.9811181319050.3944-100000@atari.cmj.com>; from Aaron Clow on Wed, Nov 18, 1998 at 01:22:36PM -0500
References:  <Pine.BSF.4.01.9811181319050.3944-100000@atari.cmj.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 18, 1998 at 01:22:36PM -0500, Aaron Clow wrote:
> After an uptime of 52 days on my new FreeBSD/Apache server, my office
> power went out and the machine rebooted. It's not mission-critical (just a
> 486/25 sitting headless under my desk, running a personal website), so I
> don't have a UPS on it. I would, however, like Apache to be restarted if
> the machine reboots itself. Is there an initscript in FreeBSD that takes
> care of this? If so, anyone know where it is and what I need to change to
> activate the auto-start of apachectl?

If you installed Apache from the port, there should be a shell script in
/usr/local/etc/rc.d called apache.sh. The presence of this file should cause
apache to start at bootup.

If it's not there, put it there, with the following contents:

#!/bin/sh
[ -x /usr/local/sbin/apachectl ] && /usr/local/sbin/apachectl start \
> /dev/null && echo -n ' apache'  

Make it executable, and you should be all set.

Chris

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

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?19981118142151.A19316>