fix: 🐛 Use sudo for wg-quick

master
Keith Irwin 2023-12-02 18:50:17 -07:00
parent f2fd0cf872
commit 29f03c34b7
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ if ! res_int="$(printf '%s\n' "${psk}" | sudo /usr/bin/wg set "${TLD}" peer "${p
fi
# Save config
if ! res_conf="$(/usr/bin/wg-quick save ${TLD})"; then
if ! res_conf="$(sudo /usr/bin/wg-quick save ${TLD})"; then
printf '%s %s\n' "${?}" "${res_conf}" >&2
exit 1
fi

View File

@ -13,7 +13,7 @@ if ! res_int="$(sudo /usr/bin/wg set "${TLD}" peer "${pubkey}" remove)"; then
fi &
# Save config
if ! res_conf="$(/usr/bin/wg-quick save ${TLD})"; then
if ! res_conf="$(sudo /usr/bin/wg-quick save ${TLD})"; then
printf '%s %s\n' "${?}" "${res_conf}" >&2
exit 1
fi