Fixes from testing:

Certificate files are rejected if not both files are provided
Server shuts down controlled after pressing crtl+c
Logfile location is better checked
improvements for better testing (added ids and name in templates)
This commit is contained in:
OzzieIsaacs
2018-09-23 19:15:50 +02:00
parent cab98a9165
commit ba7c734657
11 changed files with 35 additions and 29 deletions
+7 -1
View File
@@ -5,6 +5,8 @@
from socket import error as SocketError
import sys
import os
import signal
try:
from gevent.pywsgi import WSGIServer
from gevent.pool import Pool
@@ -26,7 +28,8 @@ class server:
restart= False
def __init__(self):
pass
signal.signal(signal.SIGINT, self.killServer)
signal.signal(signal.SIGTERM, self.killServer)
def start_gevent(self):
try:
@@ -86,6 +89,9 @@ class server:
def setRestartTyp(self,starttyp):
self.restart=starttyp
def killServer(self, signum, frame):
self.stopServer()
def stopServer(self):
if gevent_present:
self.wsgiserver.close()