diff --git a/management/daemon.py b/management/daemon.py index 6c92b2e2..ef67cbe8 100755 --- a/management/daemon.py +++ b/management/daemon.py @@ -405,15 +405,19 @@ def backup_status(): @app.route('/system/privacy/enable', methods=["POST"]) @authorized_personnel_only def privacy_status_enable(): - env.update({'PRIVACY' : 'True'}) - utils.save_environment(env) + config = utils.load_settings() + config["PRIVACY"] = 'True' + utils.write_settings(config) + return "Ok" @app.route('/system/privacy/disable', methods=["POST"]) @authorized_personnel_only def privacy_status_disable(): - env.update({'PRIVACY' : 'False'}) - utils.save_environment(env) + config = utils.load_settings() + config["PRIVACY"] = 'False' + utils.write_settings(config) + return "Ok" # MUNIN diff --git a/management/status_checks.py b/management/status_checks.py index 2d3ef934..5d2f8241 100755 --- a/management/status_checks.py +++ b/management/status_checks.py @@ -16,7 +16,7 @@ from dns_update import get_dns_zones, build_tlsa_record, get_custom_dns_config, from web_update import get_web_domains, get_default_www_redirects, get_domain_ssl_files from mailconfig import get_mail_domains, get_mail_aliases -from utils import shell, sort_domains, load_env_vars_from_file +from utils import shell, sort_domains, load_env_vars_from_file, load_settings def run_checks(rounded_values, env, output, pool): # run systems checks @@ -820,7 +820,10 @@ def get_latest_miab_version(): return re.search(b'TAG=(.*)', urllib.request.urlopen("https://mailinabox.email/bootstrap.sh?ping=1").read()).group(1).decode("utf8") def check_miab_version(env, output): - if env['PRIVACY'] == 'True': + + config = load_settings() + + if config['PRIVACY'] == 'True': output.print_warning("Mail-in-a-Box version check disabled.") elif what_version_is_this(env) != get_latest_miab_version(): output.print_error("Mail-in-a-Box is outdated. To find the latest version and for upgrade instructions, see https://mailinabox.email/. ") diff --git a/management/templates/system-status.html b/management/templates/system-status.html index a326ce64..667106bf 100644 --- a/management/templates/system-status.html +++ b/management/templates/system-status.html @@ -43,7 +43,7 @@
By deactivating the adavanced privacy feature your Mail-in-a-Box will contact a remote server to check if a new version got released.
+By deactivating the advanced privacy feature your Mail-in-a-Box will contact a remote server to check if a new version got released.