Date: Sun, 30 Sep 2001 09:51:03 -0700 From: "Freddie Cash" <fcash@ocis.net> To: "Søren Neigaard" <neigaard@e-box.dk> Cc: newbies@freebsd.org Subject: Re: automatic start of Apache Message-ID: <200109301651.JAA23450@ocis.ocis.net>
next in thread | raw e-mail | index | archive | help
First, this is not the right list to be asking technical questions on. This list is for new users to
discuss their experiences running FreeBSD (the good, the bad, the ugly if needed). If you are
unsure how to phrase a technical question for the freebsd-questions list, then post the info you
have and ask for suggestions on making it better here. :) Just an FYI for next time.
> Where should I put the stuff I want to start at system startup?
Two places. If you want it to just start at boot, add a couple lines to /etc/rc.local:
echo -n "apache "
/usr/local/sbin/apachectl start
If you want to be able to control its start/stop/restart a la SysV/Linux, then you can create a
simple script and put it in /usr/local/etc/rc.d/ All the executable scripts in this directory are run at
boot time with a "start" argument (for FreeBSD 4+, in 3- it just ran the executable scripts).
The easiest script is like so:
#!/bin/sh
case "$1" in
start)
echo -n "apache "
/usr/local/sbin/apchectl start
;;
stop)
/usr/local/sbin/apachectl stop
;;
restart)
/usr/local/sbin/apachectl restart
;;
*)
echo "Usage: $0 {start | stop | restart}"
;;
esac
HTH,
Cheers,
Freddie
fcash@bigfoot.com
Linux is for people who hate Windows.
FreeBSD is for people that like UNIX.
-- unknown
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-newbies" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109301651.JAA23450>
