From owner-freebsd-questions Mon Dec 4 2:39:26 2000 From owner-freebsd-questions@FreeBSD.ORG Mon Dec 4 02:39:24 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from gekko.i-clue.de (server.ms-agentur.de [62.153.134.194]) by hub.freebsd.org (Postfix) with ESMTP id AC44437B400 for ; Mon, 4 Dec 2000 02:39:20 -0800 (PST) Received: from i-clue.de (automatix.i-clue.de [192.168.0.112]) by gekko.i-clue.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id MAA18690; Mon, 4 Dec 2000 12:44:28 +0100 Message-ID: <3A2B7491.8040502@i-clue.de> Date: Mon, 04 Dec 2000 11:40:17 +0100 From: Christoph Sold User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001130 X-Accept-Language: de, en MIME-Version: 1.0 To: "Alex O.Belkin" Cc: questions@FreeBSD.ORG Subject: Re: Hello!!! References: <000701c05c7a$9e440fc0$4b02a8c0@cmb> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [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 , 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: ----- #!/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 ------ 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