~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to stop-loggerhead.py

  • Committer: Robey Pointer
  • Date: 2006-12-15 08:42:22 UTC
  • Revision ID: robey@lag.net-20061215084222-x9wqt4yklp59apqz
lots of little changes:
- allow revno to be used in most urls where a revid is desired.
- clean up the upper right navbar; no more "-300 -100" confusion
- the upper left navbar is now always the same, never contextual
- for the 3 pages that had contextual buttons in the upper-left navbar, move
  them to little side-arrows underneath the h1
- add "jump to diff" link next to modified-files in /changes and /revision
- add date to inventory-view
- add copyright credits from bazaar-webserve

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python2.4
2
 
 
3
 
import pkg_resources
4
 
pkg_resources.require("TurboGears")
5
 
 
6
 
import os
7
 
import sys
8
 
 
9
 
home = os.path.realpath(os.path.dirname(__file__))
10
 
pidfile = os.path.join(home, 'loggerhead.pid')
11
 
 
12
 
try:
13
 
    f = open(pidfile, 'r')
14
 
except IOError, e:
15
 
    print 'No pid file found.'
16
 
    sys.exit(1)
17
 
 
18
 
pid = int(f.readline())
19
 
 
20
 
try:
21
 
    os.kill(pid, 0)
22
 
except OSError, e:
23
 
    print 'Stale pid file; server is not running.'
24
 
    sys.exit(1)
25
 
 
26
 
print
27
 
print 'Shutting down previous server @ pid %d.' % (pid,)
28
 
print
29
 
 
30
 
import signal
31
 
os.kill(pid, signal.SIGINT)