From owner-freebsd-questions Mon May 5 13:27:46 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA17535 for questions-outgoing; Mon, 5 May 1997 13:27:46 -0700 (PDT) Received: from cedb.dpcsys.com (cedb.DPCSYS.com [209.25.4.3]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA17495 for ; Mon, 5 May 1997 13:27:14 -0700 (PDT) Received: from localhost (dan@localhost) by cedb.dpcsys.com (8.8.5/8.8.2) with SMTP id UAA06249; Mon, 5 May 1997 20:27:09 GMT Date: Mon, 5 May 1997 13:27:09 -0700 (PDT) From: Dan Busarow To: Daniel Zborovski cc: freebsd-questions@FreeBSD.ORG Subject: Re: running a program on startup In-Reply-To: <336D7CE2.70F8@moonlighting.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Mon, 5 May 1997, Daniel Zborovski wrote: > Is there a way to run a program on startup. As it is now everytime I > want to start my apache server I need to type: > > /usr/local/apache_1.1.1/src/httpd -f > /usr/local/apache_1.1.1/conf/http.conf For 2.1.5R and up, create the directory /usr/local/etc/rc.d When the system boots it looks for files with a .sh extension in this directory and executes them. So you want to create a file named /usr/local/etc/rc.d/apache.sh containing #!/bin/sh /usr/local/apache_1.1.1/src/httpd -f /usr/local/apache_1.1.1/conf/http.conf Chmod +x it and you are all set. Dan -- Dan Busarow 714 443 4172 DPC Systems / Beach.Net dan@dpcsys.com Dana Point, California 83 09 EF 59 E0 11 89 B4 8D 09 DB FD E1 DD 0C 82