subversion on boot
Giorgos Keramidas
keramida at ceid.upatras.gr
Tue Oct 31 14:20:23 UTC 2006
On 2006-10-31 14:49, "pobox at verysmall.org" <pobox at 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 :)
More information about the freebsd-questions
mailing list