For some reason these don't work in parallel

master
Keith Irwin 2022-09-11 17:47:59 -06:00
parent 990a1b560a
commit 99f270dbe9
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 3 additions and 1 deletions

View File

@ -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
exit 6
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
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