update show-peer, fix typos

This commit is contained in:
aptalca 2023-10-03 09:13:00 -04:00
parent b46638dd4c
commit ca9c734e55
No known key found for this signature in database
GPG Key ID: BE36CFFB9FD85548
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ for i in "$@"; do
PEER_ID="peer_${i//[^[:alnum:]_-]/}"
fi
if grep -q "# ${PEER_ID}" /config/wg0.conf; then
if grep -q "# ${PEER_ID}" /config/wg_confs/wg0.conf; then
echo "PEER ${i} QR code:"
qrencode -t ansiutf8 < /config/${PEER_ID}/${PEER_ID}.conf
else

View File

@ -22,7 +22,7 @@ fi
unset FAILED
for tunnel in ${WG_CONFS[@]}; do
echo "**** Activating tunnel ${tunnel} ****"
wgquick up "${tunnel}" || ( echo FAILED="${tunnel}" && break)
wg-quick up "${tunnel}" || ( echo FAILED="${tunnel}" && break)
done
if [[ -z "${FAILED}" ]]; then
@ -35,7 +35,7 @@ else
break
else
echo "**** Disabling tunnel ${tunnel} ****"
wgquick down "${tunnel}" || :
wg-quick down "${tunnel}" || :
fi
done
ip route del default