#!/bin/bash
#
# Startup scritp for svn server
#
# chkconfig: 345 85 15
# description: svn daemon server
# processname svnd
# Source function library.
. /etc/rc.d/init.d/functions
prog=svn-daemon
propath=/home/svnroot
svnserve=/usr/local/subversion/bin/svnserve
pidfile=/tmp/svnd.pid
RETVAL=0
start() {
echo -n $"Starting $prog: "
daemon svnserve -d -r $propath
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch ${pidfile}
return $RETVAL
}
stop(){
echo -n $"Stopping $prog: "
daemon killall svnserve
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -rf ${pidfile}
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: $prog {start|stop|restart}"
exit 1
;;
esac
exit $RETVAL
chkconfig --add svnd或者到ntsysv中勾上svnd
使用service svnd管理
阅读(1254) | 评论(0) | 转发(0) |