This commit is contained in:
maaa 2023-08-10 18:10:30 +02:00
parent 6a480af7ff
commit 6c3e847fc6
2 changed files with 148 additions and 0 deletions

23
down Normal file
View File

@ -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")

125
templates/down.html Normal file

File diff suppressed because one or more lines are too long