From b78610cb982075b66434eff90ad4dd4e363988b9 Mon Sep 17 00:00:00 2001 From: angristan Date: Sun, 5 May 2019 13:09:07 +0200 Subject: [PATCH] Make shellcheck happy --- wireguard-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index 107d7fb..76ed6d5 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -56,24 +56,24 @@ Address = $SERVER_WG_IPV4/24,$SERVER_WG_IPV6/64 ListenPort = $SERVER_PORT PrivateKey = $SERVER_PRIV_KEY PostUp = iptables -t nat -A POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE; ip6tables -t nat -A POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE -PostDown = iptables -t nat -D POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE; ip6tables -t nat -D POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE" > /etc/wireguard/$SERVER_WG_NIC.conf +PostDown = iptables -t nat -D POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE; ip6tables -t nat -D POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE" > "/etc/wireguard/$SERVER_WG_NIC.conf" # Add the client as a peer to the server echo "[Peer] PublicKey = $CLIENT_PUB_KEY -AllowedIPs = $CLIENT_WG_IPV4/32,$CLIENT_WG_IPV6/128" >> /etc/wireguard/$SERVER_WG_NIC.conf +AllowedIPs = $CLIENT_WG_IPV4/32,$CLIENT_WG_IPV6/128" >> "/etc/wireguard/$SERVER_WG_NIC.conf" # Create client file with interface echo "[Interface] PrivateKey = $CLIENT_PRIV_KEY Address = $CLIENT_IPV4/24,$CLIENT_IPV6/64 -DNS = $CLIENT_DNS_1,$CLIENT_DNS_2" > ~/$SERVER_WG_NIC-client.conf +DNS = $CLIENT_DNS_1,$CLIENT_DNS_2" > "$HOME/$SERVER_WG_NIC-client.conf" # Add the server as a peer to the client echo "[Peer] PublicKey = $SERVER_PUB_KEY -Endpoint = $SERVER_PUB_IPV4:1194 -AllowedIPs = 0.0.0.0/0,::/0" >> ~/$SERVER_WG_NIC-client.conf +Endpoint = $SERVER_PUB_IP:1194 +AllowedIPs = 0.0.0.0/0,::/0" >> "$HOME/$SERVER_WG_NIC-client.conf" # Enable routing on the server echo "net.ipv4.ip_forward = 1