Date command needs to be run with sudo
This commit is contained in:
parent
410f1b7913
commit
6c0fcdd295
1 changed files with 2 additions and 2 deletions
|
|
@ -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":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue