diff --git a/README.md b/README.md index dda8a2b..517e5f7 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,11 @@ Copy config.ini.example to config.ini and edit accordingly Use your web server to host everything in public, and run app.py with python. -Reverse-proxy signup/signup.py to /register, and run as an a normal user with doas permissions for maddy +Reverse-proxy signup/signup.py to /register -Reverse-proxy login/login.py to /login, and run as the maddy user to have r/w access to the db +Reverse-proxy account/account.py to /account + +Run both scripts as a user with access to the Maddy DB and CLI tools ## Dependencies diff --git a/login/login.py b/account/account.py similarity index 87% rename from login/login.py rename to account/account.py index a33f2dc..fa676fd 100644 --- a/login/login.py +++ b/account/account.py @@ -8,18 +8,15 @@ from waitress import serve config = configparser.ConfigParser() config.read("../config.ini") -secretkey = config.get("Login", "secretkey") -database = config.get("Login", "database") -runport = config.get("Login", "port") +database = config.get("Account", "database") +runport = config.get("Account", "port") # Status report -print("HectaMail Login Service is starting up...") -print("Your secret key is:", secretkey) +print("HectaMail Account Service is starting up...") print("Your database is located at:", database) app = Flask(__name__) -app.secret_key = secretkey def fetch_hash_from_database(key): conn = sqlite3.connect(database) diff --git a/account/templates/confirm.html b/account/templates/confirm.html new file mode 100644 index 0000000..948e18c --- /dev/null +++ b/account/templates/confirm.html @@ -0,0 +1,21 @@ + +
+ +