#!/bin/sh # # service-svn-run # John Simpson 2008-02-16 # ############################################################################### # # Copyright (C) 2008 John Simpson. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 or version 3 of the # license, at your option. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # ############################################################################### IP=127.0.0.1 PORT=3690 ACCESS_CDB= REPO_ROOT=/home/svn/repos MAX=20 UU=`id -u svn` GG=`id -g svn` ############################################################################### # # build the command line CMD="tcpserver -v -H -R -c ${MAX:-20}" CMD="$CMD -u ${UU:?UU not defined} -g ${GG:?GG not defined}" if [ -n "${ACCESS_CDB:-}" ] then CMD="$CMD -x $ACCESS_CDB" fi CMD="$CMD ${IP:?IP is not set} ${PORT:-3690} svnserve -i -r $REPO_ROOT" ############################################################################### # # do the deed umask 022 echo "$CMD" exec env - PATH="/usr/bin:/bin:/usr/local/bin" $CMD 2>&1 echo exec failed