mirror of
https://github.com/house-of-vanity/conf_bot.git
synced 2025-07-06 14:24:08 +00:00
20 lines
413 B
Python
20 lines
413 B
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
from webhook import WebHook
|
|
import settings
|
|
import signal
|
|
import sys
|
|
|
|
# catch ctrl+c
|
|
def signal_handler(signal, frame):
|
|
print('Exiting...')
|
|
settings.db.close()
|
|
sys.exit(0)
|
|
signal.signal(signal.SIGINT, signal_handler)
|
|
|
|
wh = WebHook(
|
|
certfile = 'assets/cert.pem',
|
|
keyfile='assets/cert.key',
|
|
port=8080)
|
|
|
|
wh.serve() |