diff --git a/imageroot/actions/get-configuration/10get b/imageroot/actions/get-configuration/10get index 3b41efe..3aeca7d 100755 --- a/imageroot/actions/get-configuration/10get +++ b/imageroot/actions/get-configuration/10get @@ -7,9 +7,7 @@ import json import sys -import os import network -import subprocess config = json.load(open("config.json")) if config["interface"] != "" and config["dhcp-server"]["start"] == "" and config["dhcp-server"]["end"] == "": @@ -19,10 +17,5 @@ if config["interface"] != "" and config["dhcp-server"]["start"] == "" and config config["dhcp-server"]["end"] = str(interface["end"]) config["are_dns_bound"] = network.are_ports_53_bound() -try: - p = subprocess.run(['systemctl', 'is-active', '-q', os.environ['MODULE_ID']]) - config['running'] = (p.returncode == 0) -except: - config['running'] = False json.dump(config, sys.stdout) diff --git a/imageroot/actions/get-configuration/validate-output.json b/imageroot/actions/get-configuration/validate-output.json index 59813a5..a637898 100644 --- a/imageroot/actions/get-configuration/validate-output.json +++ b/imageroot/actions/get-configuration/validate-output.json @@ -97,10 +97,6 @@ "secondary-server" ] }, - "running": { - "description": "True if dnsmasq is configured", - "type": "boolean" - }, "are_dns_bound": { "description": "True if DNS servers are bound to the interface", "type": "boolean" @@ -110,7 +106,6 @@ "interface", "dhcp-server", "dns-server", - "running", "are_dns_bound" ] } diff --git a/ui/src/views/Settings.vue b/ui/src/views/Settings.vue index d0eab3d..2ba16f3 100644 --- a/ui/src/views/Settings.vue +++ b/ui/src/views/Settings.vue @@ -162,12 +162,14 @@
{{ $t("settings.DNS_description") }}
- + @@ -212,7 +214,9 @@ :icon="Save20" :loading="loading.configureModule" :disabled=" - loading.getConfiguration || loading.configureModule + loading.getConfiguration || + loading.configureModule || + (are_dns_bound && !dnsEnableField) " >{{ $t("settings.save") }} @@ -262,7 +266,6 @@ export default { dhcpEndField: "", dhcpLeaseField: 12, are_dns_bound: false, - running: false, dnsEnableField: false, dnsPrimaryField: "", dnsSecondaryField: "", @@ -420,7 +423,6 @@ export default { this.dnsPrimaryField = dns_server["primary-server"]; this.dnsSecondaryField = dns_server["secondary-server"]; this.are_dns_bound = config["are_dns_bound"]; - this.running = config["running"]; }, validateConfigureModule() { this.clearErrors(this);