@@ -517,7 +517,7 @@ DNS = ${CLIENT_DNS_1},${CLIENT_DNS_2}
517517PublicKey = ${SERVER_PUB_KEY}
518518PresharedKey = ${CLIENT_PRE_SHARED_KEY}
519519Endpoint = ${ENDPOINT}
520- AllowedIPs = ${ALLOWED_IPS} " > "${HOME_DIR} / ${ SERVER_WG_NIC}- client- ${CLIENT_NAME} .conf"
520+ AllowedIPs = ${ALLOWED_IPS} " > "${SERVER_WG_NIC} - client- ${CLIENT_NAME} .conf"
521521
522522 # Add the client as a peer to the server
523523 echo -e "\n### Client ${CLIENT_NAME}
@@ -537,7 +537,7 @@ DNS = ${CLIENT_DNS_1},${CLIENT_DNS_2}
537537PublicKey = ${SERVER_PUB_KEY}
538538PresharedKey = ${CLIENT_PRE_SHARED_KEY}
539539Endpoint = ${ENDPOINT}
540- AllowedIPs = ${ALLOWED_IPS} " > "${HOME_DIR} / ${ SERVER_WG_NIC}- client- ${CLIENT_NAME} .conf"
540+ AllowedIPs = ${ALLOWED_IPS} " > "${SERVER_WG_NIC} - client- ${CLIENT_NAME} .conf"
541541
542542 # Add the client as a peer to the server
543543 echo -e "\n### Client ${CLIENT_NAME}
@@ -557,7 +557,7 @@ DNS = ${CLIENT_DNS_1},${CLIENT_DNS_2}
557557PublicKey = ${SERVER_PUB_KEY}
558558PresharedKey = ${CLIENT_PRE_SHARED_KEY}
559559Endpoint = ${ENDPOINT}
560- AllowedIPs = ${ALLOWED_IPS} " > "${HOME_DIR} / ${ SERVER_WG_NIC}- client- ${CLIENT_NAME} .conf"
560+ AllowedIPs = ${ALLOWED_IPS} " > "${SERVER_WG_NIC} - client- ${CLIENT_NAME} .conf"
561561
562562 # Add the client as a peer to the server
563563 echo -e "\n### Client ${CLIENT_NAME}
@@ -572,7 +572,7 @@ AllowedIPs = ${CLIENT_WG_IPV4}/32,${CLIENT_WG_IPV6}/128" >>"/etc/wireguard/${SER
572572 # Generate QR code if qrencode is installed
573573 if command -v qrencode &>/dev/null; then
574574 echo -e "${GREEN} \nHere is your client config file as a QR Code: \n${NC} "
575- qrencode -t ansiutf8 -l L <"${HOME_DIR} / ${ SERVER_WG_NIC}- client- ${CLIENT_NAME} .conf"
575+ qrencode -t ansiutf8 -l L <"${SERVER_WG_NIC} - client- ${CLIENT_NAME} .conf"
576576 echo ""
577577 fi
578578
@@ -617,7 +617,7 @@ function revokeClient() {
617617
618618 # remove generated client file
619619 HOME_DIR=$(getHomeDirForClient "${CLIENT_NAME} ")
620- rm -f "${HOME_DIR} / ${ SERVER_WG_NIC}- client- ${CLIENT_NAME} .conf"
620+ rm -f "${SERVER_WG_NIC} - client- ${CLIENT_NAME} .conf"
621621
622622 # restart wireguard to apply changes
623623 wg syncconf "${SERVER_WG_NIC} " < (wg- quick strip "${SERVER_WG_NIC} ")
0 commit comments