From f962c906aefe18a81a5ae1090eba9605c0983837 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Sun, 6 Nov 2022 18:26:14 -0700 Subject: [PATCH] Fixed logging --- back/lib/dashboard/ssl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/back/lib/dashboard/ssl b/back/lib/dashboard/ssl index 36915e7..2ae3914 100755 --- a/back/lib/dashboard/ssl +++ b/back/lib/dashboard/ssl @@ -48,9 +48,7 @@ fi if ! domain="$("${LIB_DIR}/ns_lookup_rdns" "${ip}")"; then printf 'ERROR! Failed to lookup domain from user IP %s\n' "${ip}" | tee -a "${LOGFILE}" | "${LIB_DIR}/http_res" 500 exit 7 -fi -printf "${domain}" >>"${LOGFILE}" -if ! username="$(<<<"${domain}" cut -d'.' -f2)"; then +fi; if ! username="$(<<<"${domain}" cut -d'.' -f2)"; then printf 'ERROR! Failed to parse username from domain "%s"\n' "${domain}" >>"${LOGFILE}" "${LIB_DIR}/http_res" 500 exit 8 @@ -71,7 +69,7 @@ if ! [ -f "${path}" ]; then fi # Try to return it to the user -if ! <"${file}" "${LIB_DIR}/http_res" 200; then - printf 'ERROR! Failed to return file: "%s"\n' | tee -a "${LOGFILE}" | "${LIB_DIR}/http_res" 500 +if ! <"${path}" "${LIB_DIR}/http_res" 200; then + printf 'ERROR! Failed to return file: "%s"\n' "${path}" | tee -a "${LOGFILE}" | "${LIB_DIR}/http_res" 500 exit 11 fi