~ubuntu-branches/debian/squeeze/desktopcouch/squeeze

« back to all changes in this revision

Viewing changes to bin/desktopcouch-stop

  • Committer: Bazaar Package Importer
  • Author(s): David Paleino
  • Date: 2010-03-04 19:11:48 UTC
  • mfrom: (1.5.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100304191148-zcwp3rffruwkalvc
Tags: 0.6.2-1
* New upstream version
* debian/patches/01-use_simplejson.patch removed, better handled
  upstream (simplejson for py2.5 and json for py2.6)
* debian/rules: chmod desktop-stop to 755, since it's intended as
  an executable script
* debian/control: bump debhelper dependency to >= 7.0.50~ to use
  overridden rules in debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
"""
20
20
Stop local CouchDB server.
21
21
"""
22
 
import subprocess, sys
23
 
from desktopcouch import local_files
24
 
 
25
 
local_exec = local_files.COUCH_EXEC_COMMAND + ["-k"]
26
 
try:
27
 
    retcode = subprocess.call(local_exec, shell=False)
28
 
    if retcode < 0:
29
 
        print >> sys.stderr, "Child was terminated by signal", -retcode
30
 
    elif retcode > 0:
31
 
        print >> sys.stderr, "Child returned", retcode
32
 
except OSError, e:
33
 
    print >> sys.stderr, "Execution failed: %s: %s" % (e, local_exec)
34
 
    exit(1)
35
 
 
36
 
 
 
22
 
 
23
from desktopcouch.stop_local_couchdb import stop_couchdb
 
24
stop_couchdb()