3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

coremods: make _shutdown remove running 'config'.pid

This commit is contained in:
Ken Spencer 2016-10-15 16:50:25 -04:00
parent a30942669a
commit bc4be815e4

View File

@ -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)