From 6c0fcdd295d30e49615b50b5d30f935d676a5b45 Mon Sep 17 00:00:00 2001 From: Ana Custura Date: Tue, 7 Apr 2026 21:30:32 +0100 Subject: [PATCH] Date command needs to be run with sudo --- app/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routes.py b/app/routes.py index c316fec..0c504bb 100644 --- a/app/routes.py +++ b/app/routes.py @@ -218,9 +218,9 @@ def step2(): set_setting('butterbox_logo', new_value) db.session.commit() linux_date_arg = str(form.butterbox_date.data).replace(" ", "T") + "Z" - output = subprocess.run(["/usr/bin/date", "-s", linux_date_arg], capture_output=True, text=True) + output = subprocess.run(["sudo", "/usr/bin/date", "-s", linux_date_arg], capture_output=True, text=True) if output.returncode != 0: - flash(f"Could not set date. Please set date manually.", category="error") + flash(f"Could not set date. Please set date manually: {output}.", category="error") return redirect(url_for('step3')) if get_setting("first_setup") == "true":