#!/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/svnvim
chmod +x /etc/init.d/svnbash
chkconfig --add svnide
chkconfig svn onsvn
chkconfig --list|grep svnrest
service svn start stop restartserver