Fixed logging
parent
21a31085ba
commit
f962c906ae
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue