Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2002 18:48:00 +1100
From:      Edwin Groothuis <edwin@mavetju.org>
To:        "J . S ." <johann@broadpark.no>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Automatic startup of OpenFTPD (!!!)
Message-ID:  <20020130184800.A823@k7.mavetju.org>
In-Reply-To: <20020130082455.1bf4f8c7.johann@broadpark.no>; from johann@broadpark.no on Wed, Jan 30, 2002 at 08:24:55AM %2B0100
References:  <20020130082455.1bf4f8c7.johann@broadpark.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 30, 2002 at 08:24:55AM +0100, J . S . wrote:
> I'd just like it started at each bootup, like every other service on my system.
> 
> The OpenFTPD tutorial mentions nothing about this.

It's system specific.

> I'm running OpenFTPD as user 'ftpd', and I'd like the service to be
> loaded at startup.

Have a look at other startup scripts which are placed in
/usr/local/etc/rc.d, they are started with "start" as argument.

[~] edwin@k7>less /usr/local/etc/rc.d/snmpd.sh 
#!/bin/sh

if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
    echo "$0: Cannot determine the PREFIX" >&2
    exit 1
fi

case "$1" in
start)
        [ -x ${PREFIX}/sbin/snmpd ] && ${PREFIX}/sbin/snmpd && echo -n ' snmpd'
        ;;
stop)
        killall snmpd && echo -n ' snmpd'
        ;;
*)
        echo "Usage: `basename $0` {start|stop}" >&2
        ;;
esac

exit 0


Your openftpd.sh should do something similair.

Edwin
-- 
Edwin Groothuis   |              Personal website: http://www.MavEtJu.org
edwin@mavetju.org |           Interested in MUDs? Visit Fatal Dimensions:
------------------+                       http://www.FatalDimensions.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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