Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Nov 17, 2012 6:13 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
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.


Top
   
PostPosted: Sat Nov 17, 2012 11:16 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
I insert a script in
/etc/init.d
that contains this:

Code:
#!/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.


Top
   
PostPosted: Sat Nov 17, 2012 11:37 am 
Offline
Senior Member

Joined: Sat Nov 27, 2010 8:21 pm
Posts: 63
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

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


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


Top
   
PostPosted: Sat Nov 17, 2012 12:16 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
Nibbler wrote:
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

Code:
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


Top
   
PostPosted: Sat Nov 17, 2012 1:08 pm 
Offline
Senior Member

Joined: Sat Nov 27, 2010 8:21 pm
Posts: 63
That's expected. Create it using the content I posted for you.


Top
   
PostPosted: Sat Nov 17, 2012 1:12 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
Nibbler wrote:
That's expected. Create it using the content I posted for you.


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


Top
   
PostPosted: Sat Nov 17, 2012 2:11 pm 
Offline
Senior Member

Joined: Sat Nov 27, 2010 8:21 pm
Posts: 63
The options need to go in /etc/sysconfig/svnserve because the init file (/etc/init.d/svnserve) will be overwritten when you upgrade subversion.


Top
   
PostPosted: Sat Nov 17, 2012 3:50 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
Nibbler wrote:
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group