Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Nov 97 19:18:41 -0800
From:      "Studded" <Studded@dal.net>
To:        "David Vondrasek" <dallas.tex@airmail.net>, "Jay Nelson" <jdn@qiv.com>
Cc:        "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: IRCD
Message-ID:  <199711170318.TAA27319@mail.san.rr.com>

next in thread | raw e-mail | index | archive | help
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 <ircd.version>/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		***




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711170318.TAA27319>