1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-05-31 18:50:47 +00:00

fix for if-statement in the middle of echo

This commit is contained in:
Chris Lewicki 2020-05-21 20:41:16 -04:00
parent 613cc12223
commit c34f7fb35e

View File

@ -38,17 +38,17 @@ function addClient() {
# Create client file and add the server as a peer
echo "[Interface]
PrivateKey = $CLIENT_PRIV_KEY
Address = $CLIENT_WG_IPV4/24,$CLIENT_WG_IPV6/64
Address = $CLIENT_WG_IPV4/24,$CLIENT_WG_IPV6/64"
# Fix for bug where trailing comma is left if no secondary DNS specified
if [ -z '$CLIENT_DNS_2' ]
then
DNS = $CLIENT_DNS_1,$CLIENT_DNS_2
echo "DNS = $CLIENT_DNS_1,$CLIENT_DNS_2"
else
DNS = $CLIENT_DNS_1
echo "DNS = $CLIENT_DNS_1"
fi
[Peer]
echo "[Peer]
PublicKey = $SERVER_PUB_KEY
PresharedKey = $CLIENT_PRE_SHARED_KEY
Endpoint = $ENDPOINT