update show-peer, fix typos

pull/302/head
aptalca 8 months ago
parent b46638dd4c
commit ca9c734e55
No known key found for this signature in database
GPG Key ID: BE36CFFB9FD85548

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

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

Loading…
Cancel
Save