Removed logging
parent
e68f2b1256
commit
b2b5c5a33a
|
@ -20,11 +20,7 @@ CONFIG_FILE='/etc/wgapi/config'
|
||||||
[ -f "${CONFIG_FILE}" ] || exit 5
|
[ -f "${CONFIG_FILE}" ] || exit 5
|
||||||
source "${CONFIG_FILE}"
|
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}")" || (
|
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}"
|
printf '%s %s\n' "${?}" "${res}" >>"${LOGFILE}"
|
||||||
exit 6
|
exit 6
|
||||||
)
|
)
|
||||||
set +x
|
|
Loading…
Reference in New Issue