#!/bin/bash
# chkconfig: - 85 15
# description: svn server
SVN_HOME=/opt/svndata
if [ ! -f "/usr/bin/svnserve" ]
then
echo "svnserver startup: cannot start"
exit
fi
case "$1" in
start)
echo "Starting svnserve…"
/usr/bin/svnserve -d --listen-port 3690 -r $SVN_HOME
echo "Finished!"
;;
stop)
echo "Stoping svnserve…"
killall svnserve
echo "Finished!"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: svn { start | stop | restart } "
exit 1
esac

vim /etc/rc.d/init.d/svn

chmod +x /etc/init.d/svn

chkconfig --add svn

chkconfig svn on

chkconfig --list|grep svn

service svn start stop restart