#!/bin/bash# chkconfig: - 85 15# description: svn serverSVN_HOME=/opt/svndataif [ ! -f "/usr/bin/svnserve" ]thenecho "svnserver startup: cannot start"exitficase "$1" instart)echo "Starting svnserve…"/usr/bin/svnserve -d --listen-port 3690 -r $SVN_HOMEecho "Finished!";;stop)echo "Stoping svnserve…"killall svnserveecho "Finished!";;restart)$0 stop$0 start;;*)echo "Usage: svn { start | stop | restart } "exit 1esac

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