Skip to content

Commit

Permalink
Added a restart command.
Browse files Browse the repository at this point in the history
  • Loading branch information
brosner committed Jul 11, 2008
1 parent 5597a2e commit 594106d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bosnowsgi.py
Expand Up @@ -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)

Expand Down

0 comments on commit 594106d

Please sign in to comment.