For some reason these don't work in parallel
parent
990a1b560a
commit
99f270dbe9
|
@ -53,7 +53,9 @@ if ! peer="$("${LIB_DIR}/wg_peer_list" "${ip}" 'tsv' | grep "${pubkey}")"; then
|
||||||
printf 'Peer not found\n' | "${LIB_DIR}/http_res" 404
|
printf 'Peer not found\n' | "${LIB_DIR}/http_res" 404
|
||||||
exit 6
|
exit 6
|
||||||
fi
|
fi
|
||||||
domain="$(<<<"${peer}" cut -f1)" & ipv4="$(<<<"${peer}" cut -f2)" & ipv6="$(<<<"${peer}" cut -f3)"
|
domain="$(<<<"${peer}" cut -f1)"
|
||||||
|
ipv4="$(<<<"${peer}" cut -f2)"
|
||||||
|
ipv6="$(<<<"${peer}" cut -f3)"
|
||||||
if ! printf 'Delete request was for %s %s %s\n' "${domain:?}" "${ipv4:?}" "${ipv6:?}" >>"${LOGFILE}"; then
|
if ! printf 'Delete request was for %s %s %s\n' "${domain:?}" "${ipv4:?}" "${ipv6:?}" >>"${LOGFILE}"; then
|
||||||
printf 'ERROR! Failed to collect peer data: %s %s %s\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}" &
|
printf 'ERROR! Failed to collect peer data: %s %s %s\n' "${domain}" "${ipv4}" "${ipv6}" >>"${LOGFILE}" &
|
||||||
printf 'Failed to collect peer data\n' | "${LIB_DIR}/http_res" 500
|
printf 'Failed to collect peer data\n' | "${LIB_DIR}/http_res" 500
|
||||||
|
|
Loading…
Reference in New Issue