From 6c3e847fc6705084674b8a00265b24fb2dd8a382 Mon Sep 17 00:00:00 2001 From: maaa Date: Thu, 10 Aug 2023 18:10:30 +0200 Subject: [PATCH] changes --- down | 23 ++++++++ templates/down.html | 125 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 down create mode 100644 templates/down.html diff --git a/down b/down new file mode 100644 index 0000000..3d22f63 --- /dev/null +++ b/down @@ -0,0 +1,23 @@ +#!/usr/bin/python3 +import configparser +from waitress import serve +from flask import Flask, render_template, request, url_for, flash, redirect, session, make_response, send_from_directory, stream_with_context, Response, request + +config = configparser.ConfigParser() +config.read("config.ini") + +HOST = config["config"]["HOST"] +PORT = config["config"]["PORT"] +SECRET_KEY = config["config"]["SECRET_KEY"] + +app = Flask(__name__, static_folder=None) +app.config["SECRET_KEY"] = SECRET_KEY + +@app.route("/") +def main(): + return render_template("down.html"), 503 + +if __name__ == "__main__": + print("[INFO] Server started") + serve(app, host=HOST, port=PORT) + print("[INFO] Server stopped") \ No newline at end of file diff --git a/templates/down.html b/templates/down.html new file mode 100644 index 0000000..8cf8225 --- /dev/null +++ b/templates/down.html @@ -0,0 +1,125 @@ + + + + + burgernotes + + + + + + +
+

burgernotes is down

+

we're down for maintenance, please try again later!

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + \ No newline at end of file