Linux SVN self-booting

Source: Internet
Author: User

1The . SVN service self-priming script places the script in/etc/init.d/underVI/etc/rc.d/init.d/svnsvn script content: on#!/bin/Bash Geneva# Chkconfig:- -  theGeneva# DESCRIPTION:SVN ServerGenevasvn_home=/svnroot/Repos to    if[!-F"/usr/bin/svnserve" ] .     Then -    Echo "svnserver startup:cannot Start" ,Exit the    fiTen     Case " $" inch Onestart) A    Echo "Starting Svnserve ..." -/usr/local/svn/bin/svnserve-d--listen-port3690-R $SVN _home -    Echo "finished!" the    ;; -stop) -    Echo "stoping svnserve ..." -    KillallSvnserve +    Echo "finished!" -    ;; +restart) A$0Stop at$0Start -      -    ;; -*) -    Echo "USAGE:SVN {Start | stop | restart}" -Exit1 in    EsacPlease note here, do not delete # Chkconfig:- -15 and # DESCRIPTION:SVN server, otherwise unable to use Chkconfig join service, will prompt service SVN does not support Chkconfig. Then executechmod 755/etc/init.d/Svnchkconfig--add Svnchkconfig svn on last view next Chkconfig--list|grepSVN can see that SVN has been added to the service and is already on in 2345.2The shell script launches this 2nd self-startup script, which is used according to the following conditions Svnserve-D--listen-port3690-r/svnroot/repos/Svnserve-D--listen-port3691-r/svnroot/repo/The svn default boot port is 3690, there are two SVN libraries, so when this happens, the service script above will only start an SVN library. So you need to use shell scripts to implement two SVN libraries.VI/root/svn.SHsvn.sh script content:1#!/bin/Bash2Svnserve-d--listen-port3690-r/svnroot/repos/3Svnserve-d--listen-port3691-r/svnroot/repo/then add executable permissionschmod  the/root/svn.sh or chmod ug+x/root/svn.SHadd to Auto RunVI/etc/rc.local Add a line at the end/root/svn.SHthen restart the server using PS aux|grepSVN to see if SVN started. Well, if there's a better way, please let me have a call.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.