mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
coremods: make _shutdown remove running 'config'.pid
This commit is contained in:
parent
a30942669a
commit
bc4be815e4
@ -33,6 +33,12 @@ def _shutdown(irc=None):
|
||||
# Disconnect all our networks.
|
||||
remove_network(ircobj)
|
||||
|
||||
# Remove our pid file.
|
||||
log.info("Removing our pid.")
|
||||
os.remove("%s.pid" % conf.confname)
|
||||
|
||||
# Done.
|
||||
|
||||
def sigterm_handler(signo, stack_frame):
|
||||
"""Handles SIGTERM and SIGINT gracefully by shutting down the PyLink daemon."""
|
||||
log.info("Shutting down on signal %s." % signo)
|
||||
|
Loading…
Reference in New Issue
Block a user