Skip to content
Browse files

Added a restart command.

  • Loading branch information...
1 parent 5597a2e commit 594106dd68b1acb562f5aa16aa5e8f22fd75d3c7 @brosner committed Jul 11, 2008
Showing with 9 additions and 0 deletions.
  1. +9 −0 bosnowsgi.py
View
9 bosnowsgi.py
@@ -191,6 +191,15 @@ def main():
pid = open(server.pidfile, "r").read()
print "stopping %s (%s)" % (name, pid)
server.stop(pid)
+ elif command == "restart":
+ print "restarting %s" % name
+ # TODO: this should lilkely move into WSGIServerProcess, since it is
+ # duplicated.
+ if not server.pidfile:
+ sys.exit("'%s' does not have a pidfile" % name)
+ pid = open(server.pidfile, "r").read()
+ server.stop(pid)
+ server.start()
else:
sys.exit("unknown command '%s'" % command)

0 comments on commit 594106d

Please sign in to comment.
Something went wrong with that request. Please try again.