Add initial madmail installer step
This commit is contained in:
parent
441031a4ac
commit
48abccbbd6
3 changed files with 72 additions and 2 deletions
|
|
@ -17,6 +17,7 @@ import glob
|
|||
import time
|
||||
import qrcode
|
||||
from flask_babel import lazy_gettext as _l
|
||||
from install_madmail import run_madmail_installer
|
||||
|
||||
CHANGES_REQUIRING_RESTART = ['wifi_password', 'ssid', 'enable_access_point', 'enable_chat', 'enable_delta_chat', 'butterbox_hostname', 'ssh_access_settings', 'root_account_settings', 'root_password']
|
||||
RASPAP_INSTALLED = os.path.exists("/var/www/html/raspap")
|
||||
|
|
@ -231,7 +232,6 @@ def step3():
|
|||
return render_template('step3.html', raspap_installed=RASPAP_INSTALLED, form=form, get_setting=get_setting)
|
||||
return redirect(url_for('admin'))
|
||||
|
||||
|
||||
@app.route('/step4', methods=['GET', 'POST'])
|
||||
def step4():
|
||||
form = Step4Form()
|
||||
|
|
@ -252,6 +252,7 @@ def step4():
|
|||
setting_value = getattr(form, s).data
|
||||
set_setting(s, setting_value)
|
||||
set_setting('first_setup', "false")
|
||||
run_madmail_installer()
|
||||
db.session.commit()
|
||||
return redirect(url_for('setup_complete'))
|
||||
if get_setting("first_setup") == "true":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue