checker: parallelism doesn't work

This commit is contained in:
nemunaire 2019-03-26 13:16:40 +01:00
parent 23c286ea3e
commit a9d84f8ee6

View File

@ -13,8 +13,7 @@ CNT=$(curl -s https://adlin.nemunai.re/api/ips)
echo "${CNT}" | jq -r '. | keys | .[]' - | while read sid echo "${CNT}" | jq -r '. | keys | .[]' - | while read sid
do do
IP=$(echo "${CNT}" | jq -r '.["'$sid'"].wg' -) IP=$(echo "${CNT}" | jq -r '.["'$sid'"].wg' -)
if [ -n "${IP}" ] [ -n "${IP}" ] && (
then
echo -ne "\n${sid}: " echo -ne "\n${sid}: "
ping6 -q -c 1 -w 1 "${IP}1" > /dev/null && { ping6 -q -c 1 -w 1 "${IP}1" > /dev/null && {
echo -n "PONG " echo -n "PONG "
@ -57,10 +56,8 @@ EOF
EOF EOF
fi fi
} }
fi & )
done done
sleep 42
killall openssl
done done