Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Feb 2005 11:16:43 -0000
From:      "Jamie Burns" <fantasticjamieburns@hotmail.com>
To:        <ale@FreeBSD.org>
Cc:        ports@FreeBSD.org
Subject:   FreeBSD Port: mydns-mysql-0.11.0
Message-ID:  <BAY101-DAV16B5B25E08CC554C154971AC600@phx.gbl>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_0018_01C5173D.A88E7740
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,

I just updated the startup script for MyDNS on FreeBSD. Now is will only =
start if:

    mydns_enable=3D"YES"

Is included in /etc/rc.conf

Any chance something like this can be included by default for more =
consistent administration?

Also, I find it doesn't start properly as MySQL is never fully loaded =
when the start script is called. Even if I arrange the startup scripts =
alphabetically so that the MySQL server starts first. As a quick =
solution I have added a 30 second delay to the MyDNS start but I would =
love to hear a better idea.

Thanks!

Jamie Burns.
------=_NextPart_000_0018_01C5173D.A88E7740
Content-Type: application/octet-stream;
	name="mydns.sh"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="mydns.sh"

#!/bin/sh

# Suck in the configuration variables.
if [ -z "${source_rc_confs_defined}" ]; then
        if [ -r /etc/defaults/rc.conf ]; then
                . /etc/defaults/rc.conf
                source_rc_confs
        elif [ -r /etc/rc.conf ]; then
                . /etc/rc.conf
        fi
fi

if [ -z "${mydns_enable}" ]; then
        mydns_enable=no
fi

case "${mydns_enable}" in
    [Yy][Ee][Ss])

        case "$1" in
                start)

                        (sleep 30; /usr/local/sbin/mydns -b)&
                        echo -n "MyDNS starting in 30 seconds..."
                        ;;
                stop)
                        echo -n "Stopping MyDNS..."
                        kill `cat /var/run/mydns.pid`
                        ;;
                *)
                        echo ""
                        echo "Usage: `basename $0` { start | stop }"
                        echo ""
                        exit 64
                        ;;
        esac
        ;;

    *)

    rc=0
    ;;

esac

------=_NextPart_000_0018_01C5173D.A88E7740--



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