<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cat brain.stuff &#62; wordpress &#187; subversion svn startup script debian</title>
	<atom:link href="http://famvdploeg.com/blog/tag/subversion-svn-startup-script-debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://famvdploeg.com/blog</link>
	<description>A simple look on things</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:09:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Subversion (SVN) Server Startup Script</title>
		<link>http://famvdploeg.com/blog/2008/02/subversion-svn-server-startup-script/</link>
		<comments>http://famvdploeg.com/blog/2008/02/subversion-svn-server-startup-script/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 12:27:55 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[subversion svn startup script debian]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=37</guid>
		<description><![CDATA[To be able to start and stop my subversion server nicely I created the following script to startup and shutdown under debian. #! /bin/sh # /etc/init.d/svnserve: start and stop svnserve &#160; # Exit immediately if a command exits with a nonzero exit status. set -e &#160; # svnserve exists and is executable test -x /usr/bin/svnserve [...]]]></description>
			<content:encoded><![CDATA[<p>To be able to start and stop my subversion server nicely I created the following script to startup and shutdown under debian.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#! /bin/sh</span>
<span style="color: #666666; font-style: italic;"># /etc/init.d/svnserve: start and stop svnserve</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Exit immediately if a command exits with a nonzero exit status.</span>
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">-e</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># svnserve exists and is executable</span>
<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svnserve</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Directory Where the Repository is located, created with svnadmin create</span>
<span style="color: #007800;">REPOS_DIR</span>=<span style="color: #ff0000;">&quot;/opt/svn&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># The pid-file</span>
<span style="color: #007800;">PIDFILE</span>=<span style="color: #ff0000;">&quot;/var/run/svnserve.pid&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
  start<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Starting Subversion (SVN) Server&quot;</span>
        start-stop-daemon <span style="color: #660033;">--start</span> <span style="color: #660033;">--quiet</span> \
                <span style="color: #660033;">--exec</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svnserve</span> <span style="color: #660033;">--</span> <span style="color: #660033;">-dr</span> <span style="color: #007800;">$REPOS_DIR</span>
        <span style="color: #666666; font-style: italic;"># Also tried the following line but it didn't work ok</span>
        <span style="color: #666666; font-style: italic;">#       --make-pidfile --pidfile $PIDFILE</span>
        <span style="color: #007800;">PID</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">pidof</span> <span style="color: #c20cb9; font-weight: bold;">svnserve</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #c20cb9; font-weight: bold;">true</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$PID</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #007800;">$PIDFILE</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;.&quot;</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
  stop<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Stopping Subversion (SVN) Server&quot;</span>
        start-stop-daemon <span style="color: #660033;">--stop</span> <span style="color: #660033;">--quiet</span> <span style="color: #660033;">--oknodo</span> <span style="color: #660033;">--pidfile</span> <span style="color: #007800;">$PIDFILE</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$PIDFILE</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
        <span style="color: #000000; font-weight: bold;">then</span>
                <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$PIDFILE</span>
        <span style="color: #000000; font-weight: bold;">fi</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;.&quot;</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Usage: /etc/init.d/svnserve {start|stop}&quot;</span>
        <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></div></div>

<p>Place the script in /etc/init.d/svnserve and run the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">update-rc.d <span style="color: #c20cb9; font-weight: bold;">svnserve</span> defaults</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2008/02/subversion-svn-server-startup-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

