Index: libexec/rc/rc.d/svnliteserve =================================================================== --- libexec/rc/rc.d/svnliteserve +++ libexec/rc/rc.d/svnliteserve @@ -0,0 +1,40 @@ +#!/bin/sh +# +# svnliteserve.sh for rc.d usage (c) 2016 Greg Kennedy. +# $Id$ + +# PROVIDE: svnliteserve +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable SVNServe: +# +# svnliteserve_enable="YES" +# # optional +# svnliteserve_flags="-d --listen-port=3690 --listen-host 0.0.0.0" +# svnliteserve_data="/usr/local/repositories" +# svnliteserve_user="svn" +# svnliteserve_group="svn" +# +# Note: +# svnliteserve bind per default at the ipv6 address! +# If you want svnliteserve binding at ipv4 address, you have +# to use option 'svnliteserve_flags' with --listen-host parameter + +. /etc/rc.subr + +# Set some defaults +svnliteserve_enable=${svnliteserve_enable:-"NO"} +svnliteserve_flags=${svnliteserve_flags:-"-d --listen-port=3690 --listen-host 0.0.0.0"} +svnliteserve_data=${svnliteserve_data:-"/home/svn/repos"} +svnliteserve_user=${svnliteserve_user:-"svn"} +svnliteserve_group=${svnliteserve_group:-"svn"} + +name=svnliteserve +rcvar=svnliteserve_enable +load_rc_config $name +command=/usr/bin/svnliteserve +command_args="-r ${svnliteserve_data}" + +run_rc_command "$1"