Starting svnserve at boot time
This quick article explains how to get the subversion (SVN) daemon, svnserve, to start everytime your server restarts.
Motivation
We’re currently moving all of our repositories to a brand new, purpose built development server. In an attempt to do everything right from the start, this particular task was on my to-do list. Everytime the old server was restarted, I had to go in and start the subversion server manually. This script does away with that.
How?
Download the startup script and copy it to the /etc/init.d/ folder. You will need superuser access for this. (Either sign in as root, or type sudo before each of the commands). This can be done in the terminal:
$ cd /etc/init.d/
$ wget http://www.whompbox.com/wp-content/uploads/2008/07/svnserve
Next you want to make the script executable:
$ chmod +x svnserve
Now add it to the startup sequence:
$ update-rc.d svnserve defaults
Now you should configure the few things in the script which are specific to you. These can be found at the top of the file. The two that you are most likely to change are
SVN_ROOT_PATH
SVNUSER
which tell the scripts where your repositories are on the system and what username you want the daemon to run under.
Finally:
$ /etc/init.d/svnserve start
to start the server.
Resources
Your Thoughts
Comments, questions and suggestions are always welcome. Just leave a comment.
— Martin McNickle
July 8th, 2008 at 10:42 pm
So did me writing a nonsense blog inspire you to get updatin’?