~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to stop-loggerhead

  • Committer: Michael Hudson
  • Date: 2009-04-01 14:40:05 UTC
  • Revision ID: michael.hudson@canonical.com-20090401144005-trxdnfy5hd5wrd39
a quick dose of IE compatibility:
* ''.splice behaves differently
* io-queue doesn't seem to work, but isn't useful for me anyway...

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import sys
20
20
from optparse import OptionParser
21
21
 
22
 
from loggerhead import release
23
 
 
24
22
home = os.path.realpath(os.path.dirname(__file__))
25
23
default_pidfile = os.path.join(home, 'loggerhead.pid')
26
 
parser = OptionParser(usage='usage: %prog [options]', version='%prog ' + release.version)
 
24
parser = OptionParser(usage='usage: %prog [options]', version='%prog')
27
25
parser.add_option('-p', '--pidfile', dest="pidfile", default=default_pidfile,
28
 
                                  help="override pidfile location")
 
26
                  help="override pidfile location")
29
27
 
30
28
options, args = parser.parse_args()
31
29
if len(args) > 0:
32
 
        parser.error('No filename arguments are used, only options.')
 
30
    parser.error('No filename arguments are used, only options.')
33
31
 
34
32
try:
35
33
    f = open(options.pidfile, 'r')
46
44
    sys.exit(1)
47
45
 
48
46
print
49
 
print 'Shutting down previous server @ pid %d.' % (pid,)
 
47
print 'Shutting down previous server @ pid %d.' % pid
50
48
print
51
49
 
52
50
import signal