From owner-freebsd-questions Tue Jun 18 12:51:34 2002 Delivered-To: freebsd-questions@freebsd.org Received: from infinity.aesredfish.net (ns1.aesredfish.net [65.168.0.12]) by hub.freebsd.org (Postfix) with ESMTP id A426637B403 for ; Tue, 18 Jun 2002 12:51:27 -0700 (PDT) Received: from potentialtech.com (mhope-dhcp-65-168-1-181.dashfast.com [65.168.1.181]) by infinity.aesredfish.net (8.11.6/8.11.0) with ESMTP id g5IJp9r17762; Tue, 18 Jun 2002 15:51:10 -0400 Message-ID: <3D0F9094.4030601@potentialtech.com> Date: Tue, 18 Jun 2002 15:57:08 -0400 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0rc1) Gecko/20020502 X-Accept-Language: en-us, en MIME-Version: 1.0 To: jdarnold@buddydog.org Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Starting a daemon References: <200206181528530221.0613E0A5@mail.speakeasy.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 Jonathan Arnold wrote: > I'm a little confused when it comes to installing software that runs as > a daemon. For instance, I'm going to run bftpd, so I did a make && make install > from /usr/ports/ftp/bftpd, and it seemed to install fine. How do I know if > I need to do anything to start the daemon upon reboot? Where do I look? > Or where do I add a line to start it? Do I put a line in inetd.conf? FreeBSD generally puts startup scripts for daemons in /usr/local/etc/rc.d Any file in this directory that ends in .sh and has execute permissions on it is executed at system startup with the single parameter "start". If you have any daemons installed, you can look through this directory and you'll see that most of these are shell scripts that handle whatever is needed in order to start the daemon. Most daemons that install from ports will create a file like "bftpd.sh.sample" in this directory at install time. It's your job (as sysadmin) to review this script and make sure it's what you want before copying it to "bftpd.sh" Especially since many daemons can start with different options, you want to make sure it's doing what you want. You should check, though. I've occasionally run across daemons that install the *.sh script directly, so you always want to check after installation. If you don't know if the daemon is running, use "sockstat" to see if anything is listening on the ftp port for connections. This will tell you if any ftp daemons are _currently_ running, although it doesn't tell you whether or not it will be started on reboot. Additionally, many daemons are started as needed by inetd. See the man pages for inetd to see how this works and decide if you want to do it that way. -- Bill Moran Potential Technologies http://www.potentialtech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message