starting subversion at every boot on CentOS 6
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
/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.
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
@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
@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.