mirror of
https://github.com/angristan/wireguard-install.git
synced 2024-11-24 05:56:02 +03:00
Rename variable
This commit is contained in:
parent
02092b94a6
commit
3b2fb57231
@ -67,9 +67,8 @@ read -rp "First DNS resolver to use for the client: " -e -i "$CLIENT_DNS_1" CLIE
|
|||||||
CLIENT_DNS_2="176.103.130.131"
|
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
|
read -rp "Second DNS resolver to use for the client: " -e -i "$CLIENT_DNS_2" CLIENT_DNS_2
|
||||||
|
|
||||||
# Ask for pre-shared symmetric key
|
SYM_KEY="y"
|
||||||
IS_PRE_SYMM="y"
|
read -rp "Want to use a pre-shared symmetric key? [Y/n]: " -e -i "$SYM_KEY" SYM_KEY
|
||||||
read -rp "Want to use pre-shared symmetric key? [Y/n]: " -e -i "$IS_PRE_SYMM" IS_PRE_SYMM
|
|
||||||
|
|
||||||
if [[ $SERVER_PUB_IP =~ .*:.* ]]
|
if [[ $SERVER_PUB_IP =~ .*:.* ]]
|
||||||
then
|
then
|
||||||
@ -142,7 +141,7 @@ Endpoint = $ENDPOINT
|
|||||||
AllowedIPs = 0.0.0.0/0,::/0" >> "$HOME/$SERVER_WG_NIC-client.conf"
|
AllowedIPs = 0.0.0.0/0,::/0" >> "$HOME/$SERVER_WG_NIC-client.conf"
|
||||||
|
|
||||||
# Add pre shared symmetric key to respective files
|
# Add pre shared symmetric key to respective files
|
||||||
case "$IS_PRE_SYMM" in
|
case "$SYM_KEY" in
|
||||||
[yY][eE][sS]|[yY])
|
[yY][eE][sS]|[yY])
|
||||||
CLIENT_SYMM_PRE_KEY=$( wg genpsk )
|
CLIENT_SYMM_PRE_KEY=$( wg genpsk )
|
||||||
echo "PresharedKey = $CLIENT_SYMM_PRE_KEY" >> "/etc/wireguard/$SERVER_WG_NIC.conf"
|
echo "PresharedKey = $CLIENT_SYMM_PRE_KEY" >> "/etc/wireguard/$SERVER_WG_NIC.conf"
|
||||||
|
Loading…
Reference in New Issue
Block a user