From owner-freebsd-questions@FreeBSD.ORG Tue Oct 31 14:20:23 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4D0E16A67C for ; Tue, 31 Oct 2006 14:20:23 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id E65FC43D46 for ; Tue, 31 Oct 2006 14:20:19 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id k9VEK61k025443 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 31 Oct 2006 16:20:12 +0200 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.8/8.13.8) with ESMTP id k9VEKev0091296; Tue, 31 Oct 2006 16:20:41 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.8/8.13.8/Submit) id k9VEKdxi091295; Tue, 31 Oct 2006 16:20:39 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 31 Oct 2006 16:20:39 +0200 From: Giorgos Keramidas To: pobox@verysmall.org Message-ID: <20061031142039.GE90986@gothmog.pc> References: <45475482.5020604@verysmall.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45475482.5020604@verysmall.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.543, required 5, AWL -0.14, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: subversion on boot X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Oct 2006 14:20:23 -0000 On 2006-10-31 14:49, "pobox@verysmall.org" wrote: > Hello, > > what is the best way to launch subversion (svnserve) on boot? > > So far I did not find out something that can be put in /etc/rc.conf. You can write your own rc.d script and save it in `/usr/local/etc/rc.d'. We have a very good guide about the internals of the rc.d scripts now, which you can read online at: http://www.freebsd.org/doc/en_US.ISO8859-1/articles/rc-scripting/ A sample `svnserve' script could be as simple as: #!/bin/sh . /etc/rc.subr name="svnserve" rcvar=`set_rcvar` command="/usr/sbin/${name}" start_precmd="${name}_prestart" pidfile="/var/run/${name}.pid" svnserve_prestart() { rc_flags="--pidfile ${pidfile} ${rc_flags}" return 0 } load_rc_config $name run_rc_command "$1" Note that I haven't tested this, but something like this should be all it takes to let you start or stop `svnserve' by adding in your local `/etc/rc.conf.local' file: svnserve_enable='YES' svnserve_flags='-d -R --listen-port 9000' Have a look at the `rc-scripting' article, try it out and let us know how things worked out :)