#!/bin/bash # # svnserve Startup script for the Subversion svnserve daemon # # chkconfig: - 85 15 # description: Subversion svnserve daemon # processname: svnserve # pidfile: /var/run/svnserve.pid # Source function library. . /etc/rc.d/init.d/functions export SVNSERVE=/usr/bin/svnserve export SVNSERVE_PID=/var/run/svnserve.pid export SVNSERVE_OPTS="--daemon --root /var/www/svn --pid-file ${SVNSERVE_PID}" RETVAL=0 start() { ${SVNSERVE} ${SVNSERVE_OPTS} RETVAL=$? return ${RETVAL} } stop() { if [ -f ${SVNSERVE_PID} ]; then kill -9 `cat ${SVNSERVE_PID}` rm ${SVNSERVE_PID} fi RETVAL=$? return ${RETVAL} } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; status) status -p ${SVNSERVE_PID} svnserve RETVAL=$? ;; *) echo $"Usage: $prog {start|stop|restart|status}" exit 1 esac exit $RETVAL |