cloudron-support: fix variable name

This commit is contained in:
Girish Ramakrishnan
2023-12-14 18:01:28 +01:00
parent 5ac9a7f1ef
commit 54672d9fce
+9 -5
View File
@@ -232,9 +232,9 @@ function check_expired_domain() {
}
function use_external_dns() {
local -r $conf_file="/etc/unbound/unbound.conf.d/forward-everything.conf"
local -r conf_file="/etc/unbound/unbound.conf.d/forward-everything.conf"
info "Forwarding all DNS requests to Google/Cloudflare DNS. To remove the forwarding, please delete $conf and 'systemctl restart unbound'"
info "To remove the forwarding, please delete $conf_file and 'systemctl restart unbound'"
cat > $conf_file <<EOF
forward-zone:
@@ -244,12 +244,14 @@ forward-zone:
EOF
systemctl restart unbound
success "Forwarded all DNS requests to Google (8.8.8.8) & Cloudflare DNS (1.1.1.1)"
}
function disable_dnssec() {
local -r $conf_file="/etc/unbound/unbound.conf.d/disable-dnssec.conf"
local -r conf_file="/etc/unbound/unbound.conf.d/disable-dnssec.conf"
info "Disabling DNSSEC. To reenable it, please delete $conf and 'systemctl restart unbound'"
warn "To reenable DNSSEC, please delete $conf_file and 'systemctl restart unbound'"
cat > $conf_file <<EOF
server:
@@ -257,6 +259,8 @@ server:
EOF
systemctl restart unbound
success "DNSSEC Disabled"
}
function troubleshoot() {
@@ -306,7 +310,7 @@ while true; do
--owner-login) owner_login; exit 0;;
--send-diagnostics) send_diagnostics; exit 0;;
--troubleshoot) troubleshoot; exit 0;;
--no-dnssec) disable_dnssec; exit 0;;
--disable-dnssec) disable_dnssec; exit 0;;
--use-external-dns) use_external_dns; exit 0;;
--help) break;;
--) break;;