复制代码 代码如下:
#!/bin/bash
case "$1" in
start)
svnserve -d -r /svndata
svnport=`netstat -natp | grep svnserve | awk -F: '{print $4}' | awk 'NR==1'`
if [ $svnport -eq 3690 ]
then
echo "SVN Server Already Runnning. Port:3690"
else
echo "SVN Server Does Not Start"
fi
reload)
svnport=`netstat -natp | grep svnserve | awk -F: '{print $4}' | awk 'NR==1'`
if [ $svnport -eq 3690 ]
then
killall svnserve svnserve -d -r /svndata
echo "Reload OK"
else
echo "SVN Server Is Not Running"
fi
stop)
killall svnserve
echo "SVN Server Has Been Stopped"
status)
svnport=`netstat -natp | grep svnserve | awk -F: '{print $4}' | awk 'NR==1'`
pid=`ps aux | grep svnserve | grep -v "grep" | awk '{print $2}'`
if [ $svnport -eq 3690 ]
then
echo "SVN Server (pid:$pid) 正在运行..."
else
echo "SVN Server 停止运行..."
fi
*)
echo "$0: Usage: $0 {start|status|stop|reload}"
exit 1
esac
您可能感兴趣的文章:- 删除SVN三种方法delSvn(windows+linux)
- Windows下SVN服务器搭建方法整理(apache)
- WINDOWS下搭建SVN服务器端的步骤分享(Subversion)
- 清除svn文件的bat脚本整理
- Windows下VisualSVN Server的安装与配置方法(图文)
- 如何彻底删除SVN中的文件和文件夹(附恢复方法)
- 解决常见的Eclipse SVN插件报错方法详解
- 使用svn进行版本控制
- SVN出现提示org.apache.subversion.javahl.ClientException: Attempted to lock an already-locked dir解决方案