starting subversion at every boot on CentOS 6

Hi,

as title.

I need to start subversion at every boot.

When the VPS is booted I can start the subversive server using this command

as svn user. (I login in as svn user and I type the command below)

svnserve -d -r /home/svn/repositories

how can I start this command at every boot as the svn user?

thanks.

7 Replies

I insert a script in

/etc/init.d

that contains this:

#!/bin/bash
svnserve -d -r /home/svn/repositories

If I start it manually it works, if I reboot, subversion does not start…

any idea?

the script is chomod +x obviously.

Where did you install subversion from? The package in the repo comes with an init script. You just need to put your options in /etc/sysconfig/svnserve

OPTIONS="-r /home/svn/repositories"

and then "chkconfig svnserve on" to enable on boot.

@Nibbler:

Where did you install subversion from? The package in the repo comes with an init script. You just need to put your options in /etc/sysconfig/svnserve

OPTIONS="-r /home/svn/repositories"

and then "chkconfig svnserve on" to enable on boot.

I installed it via yum.

yum install subversion

the problem is that I don't have the file

/etc/sysconfig/svnserve

That's expected. Create it using the content I posted for you.

@Nibbler:

That's expected. Create it using the content I posted for you.

I added the OPTIONS variables to the /etc/init.d/svnserve

file

The options need to go in /etc/sysconfig/svnserve because the init file (/etc/init.d/svnserve) will be overwritten when you upgrade subversion.

@Nibbler:

The options need to go in /etc/sysconfig/svnserve because the init file (/etc/init.d/svnserve) will be overwritten when you upgrade subversion.

nice thinking, thanks.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct