728x90
반응형
def killhandle(signum, frame):
''' This will close connections cleanly '''
line = "SIGTERM detected, shutting down"
syslog.syslog(syslog.LOG_INFO, line)
rdb_server.close()
syslog.closelog()
sys.exit(0)
signal.signal(signal.SIGTERM, killhandle)
반응형
'엔지니어 > Python' 카테고리의 다른 글
parsing (0) | 2016.05.26 |
---|---|
python source install (0) | 2016.05.26 |
Attack alrams (0) | 2016.05.26 |
pygeoip (0) | 2016.05.26 |
DDoS Attack alarm(telegram) (0) | 2016.05.26 |