diff --git a/back/lib/wg_peer_add b/back/lib/wg_peer_add index d7cc627..f644dd0 100755 --- a/back/lib/wg_peer_add +++ b/back/lib/wg_peer_add @@ -20,11 +20,7 @@ CONFIG_FILE='/etc/wgapi/config' [ -f "${CONFIG_FILE}" ] || exit 5 source "${CONFIG_FILE}" -set -x -# TODO: Fix this to not give NOPASSWD visudo to bash or su -# https://askubuntu.com/a/1334988 res="$(printf '%s\n' "${2}" | sudo /usr/bin/wg set "${TLD}" peer "${1}" preshared-key /dev/stdin allowed-ips "${3}")" || ( printf '%s %s\n' "${?}" "${res}" >>"${LOGFILE}" exit 6 -) -set +x \ No newline at end of file +) \ No newline at end of file