Date: Sun, 30 Sep 2001 12:59:06 -0400 From: Walter Betancourt <walt@betan.com> To: freebsd-newbies@freebsd.org Subject: Re: automatic start of Apache Message-ID: <4.2.2.20010930125829.00b622f0@popd.betan.net> In-Reply-To: <200109301651.JAA23450@ocis.ocis.net>
next in thread | previous in thread | raw e-mail | index | archive | help
I have startup stuff in rc.conf.local does it matter ? Walt At 09:51 AM 9/30/01 -0700, you wrote: >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 Walt 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?4.2.2.20010930125829.00b622f0>