1
#!/usr/bin/env python2.4
4
pkg_resources.require("TurboGears")
9
home = os.path.realpath(os.path.dirname(__file__))
10
pidfile = os.path.join(home, 'loggerhead.pid')
13
f = open(pidfile, 'r')
15
print 'No pid file found.'
18
pid = int(f.readline())
23
print 'Stale pid file; server is not running.'
27
print 'Shutting down previous server @ pid %d.' % (pid,)
31
os.kill(pid, signal.SIGINT)