From owner-freebsd-questions@FreeBSD.ORG Sun Jan 4 12:49:08 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 119BF16A4CE for ; Sun, 4 Jan 2004 12:49:08 -0800 (PST) Received: from ms-smtp-02-eri0.southeast.rr.com (ms-smtp-02-lbl.southeast.rr.com [24.25.9.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77F7143D55 for ; Sun, 4 Jan 2004 12:49:00 -0800 (PST) (envelope-from wegster@mindcore.net) Received: from mindcore.net (rdu162-234-100.nc.rr.com [24.162.234.100]) i04KmuAb002082; Sun, 4 Jan 2004 15:48:56 -0500 (EST) Message-ID: <3FF87C38.7000205@mindcore.net> Date: Sun, 04 Jan 2004 15:48:56 -0500 From: Scott W User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031129 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Micke P References: <20040104203928.97931.qmail@web14525.mail.yahoo.com> In-Reply-To: <20040104203928.97931.qmail@web14525.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine cc: fbsd_user@a1poweruser.com cc: freebsd-questions@freebsd.org Subject: Re: starting daemons at server start X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2004 20:49:08 -0000 Micke P wrote: >If there is something that is done automatically, I >swear my karma is that it won't be done! I did do a >port apache install. And right, I don't remember that >being asked. I'm assuming there's an easier way to get >this set up besides redoing the install. > >Examples of this script(working :-))? > >Micke > > > [wegster@freeb] /usr/local/etc/rc.d [0] $ cat apache.sh #!/bin/sh case "$1" in start) [ -x /usr/local/sbin/apachectl ] && /usr/local/sbin/apachectl start > /dev/null && echo -n ' apache' ;; stop) [ -r /var/run/httpd.pid ] && /usr/local/sbin/apachectl stop > /dev/null && echo -n ' apache' ;; *) echo "Usage: `basename $0` {start|stop}" >&2 ;; esac exit 0 You'll have to check your locations of course, but the sample script should arealy exist on your system. Run /etc/periodic/weekly/310.locate cron and then: locate apache.sh-dist Scott