diff --git a/lib.py b/lib.py index c8194e8..71b2ecd 100755 --- a/lib.py +++ b/lib.py @@ -33,10 +33,19 @@ def get_config(): try: with open(args.config, "r") as file: config = yaml.safe_load(file) + if config == None: + config = { + "servers": {}, + "clients": {} + } except: try: with open(args.config, "w"): - pass + config = { + "servers": {}, + "clients": {} + } + yaml.safe_dump(config, file) except Exception as exp: log.error(f"Couldn't create config. {exp}") return None diff --git a/main.py b/main.py index 7ae3461..85d333b 100755 --- a/main.py +++ b/main.py @@ -36,7 +36,7 @@ NAMESPACE = k8s.NAMESPACE SERVERS = list() BROKEN_SERVERS = list() CLIENTS = dict() -VERSION = '5' +VERSION = '6' HOSTNAME = "" app = Flask(__name__) CORS(app) diff --git a/templates/index.html b/templates/index.html index 3628a0e..0124b20 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,10 +7,10 @@
{{ server.info()["comment"] }}