From owner-freebsd-questions@FreeBSD.ORG Sun Jan 4 13:01:11 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 C48A016A4CE for ; Sun, 4 Jan 2004 13:01:11 -0800 (PST) Received: from bsd1.xzozx.net (xzozx90.august.net [64.90.39.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0368443D3F for ; Sun, 4 Jan 2004 13:01:09 -0800 (PST) (envelope-from freebsd@xzozx.net) Received: from bsd1.xzozx.net (localhost [127.0.0.1]) by bsd1.xzozx.net (8.12.10/8.12.10) with ESMTP id i04K72BW010800; Sun, 4 Jan 2004 14:07:02 -0600 (CST) (envelope-from freebsd@xzozx.net) Received: (from www@localhost) by bsd1.xzozx.net (8.12.10/8.12.10/Submit) id i04K71WK010799; Sun, 4 Jan 2004 14:07:01 -0600 (CST) (envelope-from freebsd@xzozx.net) X-Authentication-Warning: bsd1.xzozx.net: www set sender to freebsd@xzozx.net using -f Received: from 64.216.230.200 (SquirrelMail authenticated user freebsd) by mail.xzozx.net with HTTP; Sun, 4 Jan 2004 14:07:01 -0600 (CST) Message-ID: <7242.64.216.230.200.1073246821.squirrel@mail.xzozx.net> In-Reply-To: <3FF86A6A.3010109@mindcore.net> References: <20040104192156.86503.qmail@web14525.mail.yahoo.com> <3FF86A6A.3010109@mindcore.net> Date: Sun, 4 Jan 2004 14:07:01 -0600 (CST) From: freebsd@xzozx.net To: freebsd@xzozx.net User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-xzozx.net-MailScanner-Information: Please contact the ISP for more information X-xzozx.net-MailScanner: Found to be clean 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 21:01:12 -0000 There are numerous ways for daemons to start on boot: ---------- 1) Via their enabling in /etc/rc.conf (e.g. inetd, lpd) e.g. lpd_enable="YES". Look at /etc/defaults/rc.conf for things that will start (or not start) automatically unless they are overridden in /etc/rc.conf. Inetd is an good example of this (it defaults to start, unlike lpd) - in /etc/defaults/rc.conf, the line: inetd_enable="YES" is there, which makes inetd start in boot unless inetd_enable="NO" were specified in /etc/rc.conf 2) Via /usr/local/etc/rc.d/*.sh scripts (e.g. samba) - the ports put scripts in this directory. e.g. When samba is installed from the ports tree or via sysinstall, it creates /usr/local/etc/rc.d/samba.sh.sample. You must copy or rename it to /usr/local/etc/rc.d/samba.sh to have samba start on boot. Obviously a working smb.conf file is required. The install of samba also creates /usr/local/etc/smb.conf.default - you must copy or rename it to smb.conf, then edit it as suitable for your environment. Other ports typically install sample config files and startup scripts in /usr/local/etc and /usr/local/etc/rc.d respectively. 3) Via /usr/local/etc/rc.d/*.sh scripts and /etc/rc.conf (e.g. proftpd from the ports) e.g. proftpd requires both an entry in /etc/rc.conf - proftpd_enable="YES" and /usr/local/etc/rc.d/proftpd.sh This behavior of requiring both entries (on 4.x) started sometime last year (see rc.subr in the ports tree) 4) Via /etc/rc.local Anything you put in here will start on boot, e.g. balance 3389 ts1 ts2 (this command happens to balance MS terminal server sessions between the hosts named "ts1" and "ts2") if the port "balance" is installed, othewise the command just fails. ---------- As mentioned in the thread - inetd is a super server that spawns other processes to answer requests for services. see /etc/inetd.conf for things it "responds" to. Paul > Micke P wrote: > >>Right! Ok, it's definitely not inetd that I need. I'm >>thinking primarily of starting apache and a dynamic ip >>updater automatically at startup. >> >>Micke >> >> >>--- fbsd_user wrote: >> >> >>>Maybe you just don't understand what you are seeing. >>>Inetd is the >>>Super server. Every thing you uncomment in the >>>inetd.conf file is an >>>server of it own right. But instead of an daemon >>>running for telnet >>>or FTP all the time. Inetd runs and listens on the >>>ports where those >>>services would be listings and when inetd sees an >>>request on the >>>specified port it automatically launches the server >>>for that >>>service. With inetd running , ps ax only shows inetd >>>running, but >>>start an telnet session to your box and you will see >>>that inetd has >>>spawned an telnet server session. When your telnet >>>users leaves the >>>session, the telnet server terminates. Inetd is used >>>to conserve >>>resources. >>> >>> > If you installed apache from ports, there should already be a > apache-dist.sh script in /usr/local/etc/rc.d . > Copy it to apache.sh, chmod 600 (or at least make it executable), and > apache should start at system reboot. > > Scott > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > >