aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Lacerda <lucalacerda1@gmail.com>2019-06-08 03:40:24 -0300
committerGitHub <noreply@github.com>2019-06-08 03:40:24 -0300
commit7bda5435e6fd992d51fa5cee27db6ce67fb0f1bf (patch)
treed7c2ae2f4fe939202c7a4ee1b6a58212da123f48
parent25f93b8b9db9b391aab068f1a0abf2a64e114096 (diff)
Update names and default selection
-rw-r--r--wireguard-install.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/wireguard-install.sh b/wireguard-install.sh
index cbb9309..b0bd456 100644
--- a/wireguard-install.sh
+++ b/wireguard-install.sh
@@ -68,7 +68,8 @@ CLIENT_DNS_2="176.103.130.131"
read -rp "Second DNS resolver to use for the client: " -e -i "$CLIENT_DNS_2" CLIENT_DNS_2
# Ask for pre-shared symmetric key
-read -rp "Want to use pre-shared symmetric key? [y/N] " is_pre_symm
+IS_PRE_SYMM="y"
+read -rp "Want to use pre-shared symmetric key? [Y/n]: " -e -i "$IS_PRE_SYMM" IS_PRE_SYMM
if [[ $SERVER_PUB_IP =~ .*:.* ]]
then
@@ -137,7 +138,7 @@ Endpoint = $ENDPOINT
AllowedIPs = 0.0.0.0/0,::/0" >> "$HOME/$SERVER_WG_NIC-client.conf"
# Add pre shared symmetric key to respective files
-case "$is_pre_symm" in
+case "$IS_PRE_SYMM" in
[yY][eE][sS]|[yY])
CLIENT_SYMM_PRE_KEY=$( wg genpsk )
echo "PresharedKey = $CLIENT_SYMM_PRE_KEY" >> "/etc/wireguard/$SERVER_WG_NIC.conf"