SVN启动脚本

#!/bin/bash
# chkconfig: - 85 15
# description: svn server
# svnserve -d -r /opt/svndata &
# chmod 755 /etc/init.d/svn
# chkconfig --add svn
# chkconfig svn on
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

你可能感兴趣的:(SVN启动脚本)