~cmiller/desktopcouch/service-exits-properly

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

if [ -f 'desktopcouch/local_files.py' ];
then
    PYTHONPATH=.
fi

# Stop Desktop CouchDB itself
PYTHONPATH=$PYTHONPATH python bin/desktopcouch-stop

# Stop advertising the slave's port over D-Bus
if [ "$DBUS_SESSION_BUS_ADDRESS" ]; then
  dbus-send --session --dest=org.desktopcouch.CouchDB \
   --type=method_call / org.desktopcouch.CouchDB.quit
fi