Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Dec 2000 11:40:17 +0100
From:      Christoph Sold <so@server.i-clue.de>
To:        "Alex O.Belkin" <belka@co.ru>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Hello!!!
Message-ID:  <3A2B7491.8040502@i-clue.de>
References:  <000701c05c7a$9e440fc0$4b02a8c0@cmb>

next in thread | previous in thread | raw e-mail | index | archive | help
[redirected from doc to FreeBSD-Questions@FreeBSD.org]

Alex O.Belkin wrote:

> Hello, my name is Alex, I am from Moscow.
> I need your help. I want to start my Squid (path:
> /usr/local/squid/bin/squid) in boot time, can you send me rc.conf.local
> example that will do this?

Alex,

I have redirected your question to FreeBSD-Questions@FreeBSD.org. It is the place to ask common questions about FreeBSD.

To start any application automatically at boot time, write a short shell script named <appName.sh>, make it executable and owned by root, and drop it into /usr/loca/etc/rc.d/. Most ports do this for you if they need to start up daemons at boot time. TRhe squid 2.3-port automagically produces this startup script:

---<snip here>--
#!/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)
        if [ -x ${PREFIX}/sbin/RunCache -a -f ${PREFIX}/etc/squid/squid.conf ];
then
                (cd /tmp; ${PREFIX}/sbin/RunCache >/dev/null 2>&1 &) ; echo -n '
 squid'
        fi
        ;;
stop)
        ;;
*)
        echo "Usage: `basename $0` {start|stop}" >&2
        ;;
esac

exit 0
---<snip here>---

using /etc/rc.conf.local to start up userland apps is no longer redcommended.

HTH
-Christoph Sold



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?3A2B7491.8040502>