From owner-freebsd-questions Sun Nov 16 19:19:33 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id TAA06178 for questions-outgoing; Sun, 16 Nov 1997 19:19:33 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from mail.san.rr.com (san.rr.com [204.210.0.1]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id TAA06168 for ; Sun, 16 Nov 1997 19:19:31 -0800 (PST) (envelope-from studded@san.rr.com) Received: (from studded@localhost) by mail.san.rr.com (8.8.7/8.8.7) id TAA27319; Sun, 16 Nov 1997 19:18:51 -0800 (PST) Message-Id: <199711170318.TAA27319@mail.san.rr.com> From: "Studded" To: "David Vondrasek" , "Jay Nelson" Cc: "freebsd-questions@FreeBSD.ORG" Date: Sun, 16 Nov 97 19:18:41 -0800 Reply-To: "Studded" Priority: Normal X-Mailer: PMMail 1.95a For OS/2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Re: IRCD Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sun, 16 Nov 1997 19:50:39 -0600 (CST), Jay Nelson wrote: >What's wrong with this in your /etc/rc.local file: > >if [ -x /usr/local/sbin/ircd ]; then > echo "Starting the IRC Server..." > /usr/local/sbin/ircd >fi > >-- Jay > >On Sun, 16 Nov 1997, David Vondrasek wrote: > > > Can anyone let me know the CORRECT way to have IRCD load at bootup The main problem with that is that ircd doesn't like to be (and probably shouldn't be) run as root. Depending on what version of ircd you're using, there are options in /include/config.h that would let you specify a uid and gid to for the binary. Another option would be a script that su's to a "regular" user, or a cron job that tests to see if the server is running, and starts it if it's not (the cron job running as a user of course). Here is a script that I use, if you need something more exciting than this, write the list again and I'm sure someone can come up with something. :) Doug # This cron job tests every 7 minutes for ircd, and if it's not running, # starts it up. The redirection sends the stdout message that it's running # to /dev/null, but tells you if there is an error (resulting in a startup). # Don't use "ircd" in the name of the sh script, or it will give a false positive. # Check for ircd */7 * * * * /bin/sh /root/test.sh > /dev/null #!/bin/sh /bin/ps -ax | /usr/bin/grep [i]rcd EC=$? if [ $EC != 0 ]; then /usr/local/bin/ircd fi exit *** Proud operator, designer and maintainer of the world's largest *** Internet Relay Chat server. 4,168 clients and still growing. :-) *** Try spider.dal.net on ports 6662-4 (Powered by FreeBSD) *** Part of the DALnet IRC network ***