26

I'm looking for something like:

svnserve stop
chickeninabiscuit
  • 8,307
  • 10
  • 47
  • 55

4 Answers4

27

The recommended way is to do it is by using the kill command which will allow subversion to shut down properly. I don't think there is any better way to do it.

Robert Gamble
  • 97,930
  • 23
  • 141
  • 137
  • On *nix, kill w/o any special options will instruct the program to do a graceful shutdown. On Windows, I think it will terminate with extreme prejudice... if you have a terminal window open where you launched the thing, you can always use Ctrl+C – rmeador Dec 02 '08 at 04:05
  • 2
    This is true but if you were running svnserve on Windows you should really be running it as a service instead of using -d in which case you would just use the Service Manager to shut it down. – Robert Gamble Dec 02 '08 at 04:14
  • 4
    The kill command defaults to signal 15, which sends a TERM signal to the process and terminate properly. Uness you don't do a `kill -9 svnserve` the shutdown should be clean. – domih Mar 15 '14 at 18:34
6

You can use the start-stop-daemon program to do it :

/sbin/start-stop-daemon --stop --exec /usr/bin/svnserve

To start it :

 /sbin/start-stop-daemon --start --chuid svn:svn --exec /usr/bin/svnserve -- -d -r /var/svn

Of course you can adapt user and group (svn:svn), and the SVN root path (/var/svn)

These scripts are part of another one located in /etc/init.d/svnserve that I use on all my SVN servers to manage the daemon. See this Ubuntu doc for more explanations.

JoDev
  • 6,018
  • 1
  • 20
  • 33
5

you can use the command : ps aux | grep svnserve to get the svnserve process ID
then : kill -9 [ID_of_svnserve_process]

elhaj
  • 398
  • 3
  • 10
0

also ps aux | grep -e PID -e svnserve may be useful to show titles.