From d9676bef0a8dc7f67a84cdcd45ee9b40b53cc858 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Sat, 10 Sep 2022 13:43:38 -0600 Subject: [PATCH] Added debugging for add response --- back/lib/http_res | 1 + back/srv/dashboard/add | 2 ++ 2 files changed, 3 insertions(+) diff --git a/back/lib/http_res b/back/lib/http_res index 760463e..b31878d 100755 --- a/back/lib/http_res +++ b/back/lib/http_res @@ -24,4 +24,5 @@ elif [ "${2}" == '' ] fi # Send response +printf "${status}${content_type}\n${body}\n" >>"${LOGFILE}" printf "${status}${content_type}\n${body}\n" \ No newline at end of file diff --git a/back/srv/dashboard/add b/back/srv/dashboard/add index dbcf04f..42b0ed1 100755 --- a/back/srv/dashboard/add +++ b/back/srv/dashboard/add @@ -125,7 +125,9 @@ wg_config="[Interface] # ${hostname}.${username}.${TLD}\nPrivateKey=${privkey}\n # Do it before updating nameserver and certs because # if wireguard worked, there's no going back. The admin # can clean up missing records and certs after checking the logs +set -x <<<"${wg_config}" "${LIB_DIR}/http_res" +set +x # Update nameserver if "${LIB_DIR}/ns_update_add" "${domain}" "${ipv4}" "${ipv6}"