svn自动生成并简易配置repository和重启服务的脚本
2013-01-24 18:57
411 查看
svn的安装及配置:
http://blog.csdn.net/kangquan2008/article/details/8070391
svn自动生成并简易配置repository和重启服务的脚本:
========================脚本=========================
http://blog.csdn.net/kangquan2008/article/details/8070391
svn自动生成并简易配置repository和重启服务的脚本:
========================脚本=========================
#!/bin/bash conf=/conf/svnserve.conf pw=/conf/passwd changeConf(){ sed -i 's\# anon-access = read\anon-accss = none\g' "$1"${conf} sed -i 's\# auth-access = write\auth-accss = write\g' "$1"${conf} sed -i 's\# password-db = passwd\password-db = passwd\g' "$1"${conf} } addUser(){ sed -i "s/# sally = sallyssecret/$2 = $3/g" "$1"${pw} } if [ $# -lt 1 ];then echo "Error param no.!" echo "Usage(Root needed): svn.sh create reponame \nOR svn.sh restart " exit fi if [ "$1" == "create" ]; then if [ -z "$2" ]; then echo "Error param" exit fi home=/home/ repo=${home}"$2" echo "creating repo" $repo svnadmin create $repo if [ $? -ne 0 ]; then echo create failed! exit; else read -p "inpute the username:" username read -p "inpute the password:" password changeConf $repo addUser $repo $username $password fi elif [ "$1" == "restart" ]; then if [ -z "$2" ]; then read -p "Listen on which ip:" ip fi pid=`ps -e | grep svnserve | awk '{print $1}'` kill -9 $pid 2>/dev/null 1>&2 svnserve -d -r /home --listen-host $ip else echo "error param" fi
相关文章推荐
- svn自动生成并简易配置repository和重启服务的脚本
- 不通用版(从SVN取版本,通过MAVEN生成JAVA包,通过SALTSTACK传送到远程服务器并自动重启TOMCAT服务)PYTHON代码
- 脚本自动实现DNS服务各区域配置文件
- CentOS6.7下使用非root用户(普通用户)编译安装与配置mysql数据库并使用shell脚本定时任务方式实现mysql数据库服务随机自动启动
- 自动生成linux网卡配置脚本分享
- 使用shell脚本检测weblogic服务,服务返回非200,则自动重启
- VISTA配置SVN服务自动启动的方法
- linux 根据内存使用量自动重启服务的脚本
- 监控php-fpm并自动重启服务的shell脚本
- linux centos svn 安装配置自动同步更新web服务
- activiti自动生成流程图片配置,按下图操作,然后保存时会自动生成流程图片。(设置完要重启eclipse)
- shell 实现的自动无限重启脚本,出错自动重启服务
- ZABBIX配置自动添加端口监控,并触发重启服务
- linux 根据内存使用量自动重启服务的脚本
- Nconf点生成Nagios配置文件的同时自动执行脚本
- 如何配置Linux服务,确保崩溃或重启后自动加以运行——第一部分:应用实例
- 自动重启服务的shell脚本代码
- 在windows powershell中利用脚本自动安装和配置DHCP服务
- 自动下载源码_并编译_打包_部署_重启服务的Shell脚本
- 在ubuntu上进行android开发真机调试,并且配置自动开启adb服务脚本