diff --git a/scripts/wireguard/disableCONF.sh b/scripts/wireguard/disableCONF.sh index 901256c..ec4f1b3 100755 --- a/scripts/wireguard/disableCONF.sh +++ b/scripts/wireguard/disableCONF.sh @@ -110,8 +110,8 @@ for CLIENT_NAME in "${CLIENTS_TO_CHANGE[@]}"; do # Disable the peer section from the server config echo "${CLIENT_NAME}" - sed_pattern="/### begin ${CLIENT_NAME}/," - sed_pattern="${sed_pattern}/end ${CLIENT_NAME}/ s/^/#\[disabled\] /" + sed_pattern="/### begin ${CLIENT_NAME} ###/," + sed_pattern="${sed_pattern}/end ${CLIENT_NAME} ###/ s/^/#\[disabled\] /" sed -e "${sed_pattern}" -i wg0.conf unset sed_pattern