Linux apache subversion(SVN)启动脚本
#!/bin/bash
SVN_RESOURCE_HOME=/data/svn
SVN_CONFIG_FILE=/data/svn/conf/svnserve.conf
SVN_LISTEN_PORT=3690
if [ ! -f "/usr/bin/svnserve" ]
then
echo "svnserver startup info:cannot start. Please check /usr/bin/svnserve is there. "
exit
fi
case "$1" in
start)
echo "starting svnserver..."
svnserve -d --listen-port $SVN_LISTEN_PORT -r $SVN_RESOURCE_HOME --config-file $SVN_CONFIG_FILE
echo "OK Finished !"
;;
stop)
echo "Stoping svnserver..."
killall svnserve
echo "OK Finished !"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage:svn {start | stop | restart}"
exit 1
esac