Is there a graceful way to stop svnserve -d
Asked Answered
P

5

29

I'm looking for something like:

svnserve stop
Proofread answered 2/12, 2008 at 3:13 Comment(0)
M
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.

Marte answered 2/12, 2008 at 3:22 Comment(3)
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+CAramaic
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.Marte
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.Keavy
T
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.

Truck answered 21/7, 2014 at 10:1 Comment(0)
C
5

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

Chromate answered 25/3, 2015 at 16:12 Comment(0)
F
1

A safe way which served me well is simply to use pkill,

pkill svnserve

I am using this on FreeBSD, Ubuntu and MacOS.

pkill man page.

Familial answered 4/4 at 6:19 Comment(0)
H
0

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

Halda answered 24/6, 2020 at 21:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.