[How To] SVN server autostart

SVN Server autostart (Ubuntu)


Step 1 – Create your script.
Simply create a new file (I called mine svnserve) and type the command you’d like to run.
  cd /etc/init.d/
  sudo touch svnserve
  sudo vi svnserve

add line:
  svnserve -d -r /usr/local/svn/repos
Step 2 – Save the script in the /etc/init.d/ folder
Step 3 – Make the script executable
  sudo chmod +x svnserve
Step 4 – Add the script to the boot sequence
  sudo update-rc.d svnserve defaults

That’s it. When you’re done you should see some output similar to:
Adding system startup for /etc/init.d/svnserve ...
/etc/rc0.d/K20svnserve -> ../init.d/svnserve
/etc/rc1.d/K20svnserve -> ../init.d/svnserve
/etc/rc6.d/K20svnserve -> ../init.d/svnserve
/etc/rc2.d/S20svnserve -> ../init.d/svnserve
/etc/rc3.d/S20svnserve -> ../init.d/svnserve
/etc/rc4.d/S20svnserve -> ../init.d/svnserve
/etc/rc5.d/S20svnserve -> ../init.d/svnserve

If you want to remove the script from the boot sequence you’d run the following command from terminal:
  sudo update-rc.d -f svnserve remove

Attached Files
There are no attachments for this article.
There are no comments for this article. Be the first to post a comment.
Security Code Security Code
Related Articles RSS Feed