From owner-freebsd-questions Tue Jan 29 23:48:21 2002 Delivered-To: freebsd-questions@freebsd.org Received: from topaz.mdcc.cx (topaz.mdcc.cx [212.204.230.141]) by hub.freebsd.org (Postfix) with ESMTP id EEC8137B400 for ; Tue, 29 Jan 2002 23:48:15 -0800 (PST) Received: from k7.mavetju.org (topaz.mdcc.cx [212.204.230.141]) by topaz.mdcc.cx (Postfix) with ESMTP id F0D842B711; Wed, 30 Jan 2002 08:48:12 +0100 (CET) Received: by k7.mavetju.org (Postfix, from userid 1001) id 0011A348; Wed, 30 Jan 2002 18:48:00 +1100 (EST) Date: Wed, 30 Jan 2002 18:48:00 +1100 From: Edwin Groothuis To: "J . S ." Cc: freebsd-questions@freebsd.org Subject: Re: Automatic startup of OpenFTPD (!!!) Message-ID: <20020130184800.A823@k7.mavetju.org> Mail-Followup-To: Edwin Groothuis , "J . S ." , freebsd-questions@freebsd.org References: <20020130082455.1bf4f8c7.johann@broadpark.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020130082455.1bf4f8c7.johann@broadpark.no>; from johann@broadpark.no on Wed, Jan 30, 2002 at 08:24:55AM +0100 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jan 30, 2002 at 08:24:55AM +0100, J . S . wrote: > I'd just like it started at each bootup, like every other service on my system. > > The OpenFTPD tutorial mentions nothing about this. It's system specific. > I'm running OpenFTPD as user 'ftpd', and I'd like the service to be > loaded at startup. Have a look at other startup scripts which are placed in /usr/local/etc/rc.d, they are started with "start" as argument. [~] edwin@k7>less /usr/local/etc/rc.d/snmpd.sh #!/bin/sh if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then echo "$0: Cannot determine the PREFIX" >&2 exit 1 fi case "$1" in start) [ -x ${PREFIX}/sbin/snmpd ] && ${PREFIX}/sbin/snmpd && echo -n ' snmpd' ;; stop) killall snmpd && echo -n ' snmpd' ;; *) echo "Usage: `basename $0` {start|stop}" >&2 ;; esac exit 0 Your openftpd.sh should do something similair. Edwin -- Edwin Groothuis | Personal website: http://www.MavEtJu.org edwin@mavetju.org | Interested in MUDs? Visit Fatal Dimensions: ------------------+ http://www.FatalDimensions.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message