From 77d67682044160c370e1b57a23eb69f81462c16c Mon Sep 17 00:00:00 2001 From: Filipe Melo Date: Thu, 4 Feb 2021 17:51:16 -0300 Subject: [PATCH] Add double quote to prevent globbing --- wireguard-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index f57891f..9ca4c6b 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -302,7 +302,7 @@ PublicKey = ${CLIENT_PUB_KEY} PresharedKey = ${CLIENT_PRE_SHARED_KEY} AllowedIPs = ${CLIENT_WG_IPV4}/32,${CLIENT_WG_IPV6}/128" >>"/etc/wireguard/${SERVER_WG_NIC}.conf" - wg syncconf ${SERVER_WG_NIC} <(wg-quick strip ${SERVER_WG_NIC}) + wg syncconf "${SERVER_WG_NIC}" <(wg-quick strip "${SERVER_WG_NIC}") echo -e "\nHere is your client config file as a QR Code:" @@ -340,7 +340,7 @@ function revokeClient() { rm -f "${HOME}/${SERVER_WG_NIC}-client-${CLIENT_NAME}.conf" # restart wireguard to apply changes - wg syncconf ${SERVER_WG_NIC} <(wg-quick strip ${SERVER_WG_NIC}) + wg syncconf "${SERVER_WG_NIC}" <(wg-quick strip "${SERVER_WG_NIC}") } function uninstallWg() {