mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-20 07:20:59 +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.
|
# Disconnect all our networks.
|
||||||
remove_network(ircobj)
|
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):
|
def sigterm_handler(signo, stack_frame):
|
||||||
"""Handles SIGTERM and SIGINT gracefully by shutting down the PyLink daemon."""
|
"""Handles SIGTERM and SIGINT gracefully by shutting down the PyLink daemon."""
|
||||||
log.info("Shutting down on signal %s." % signo)
|
log.info("Shutting down on signal %s." % signo)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user