/etc/rc.d/init.d/svn:
#!/bin/bash
cd $HOME
. .bash_profile
SVN_HOME=/app/svn/bin
if [ ! -f "$SVN_HOME/svnserve" ]
then
echo "svnserver startup: cannot start"
exit
fi
case "$1" in
start)
echo "Starting svnserve..."
$SVN_HOME/svnserve -d -r /opt/svndb/data
echo "Finished!"
;;
stop)
echo "Stoping svnserve..."
killall svnserve
echo "Finished!"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: svn { start | stop | restart } "
exit 1
esac
chmod 755 /etc/rc.d/init.d/svn
ln -s /etc/rc.d/init.d/svn /etc/rc.d/rc2.d/S99svn
ln -s /etc/rc.d/init.d/svn /etc/rc.d/rc3.d/S99svn
ln -s /etc/rc.d/init.d/svn /etc/rc.d/rc5.d/S99svn
ln -s /etc/rc.d/init.d/svn /etc/rc.d/rc0.d/K01svn
ln -s /etc/rc.d/init.d/svn /etc/rc.d/rc6.d/K01svn