Fixed missing sudo

master
Keith Irwin 2022-09-10 09:33:53 -06:00
parent 58b40e5cbb
commit b6c23955c9
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ CONFIG_FILE='/etc/wgapi/config'
exit 5; )
source "${CONFIG_FILE}"
wg_output="$(/usr/bin/wg show "${TLD}" allowed-ips)" || (
wg_output="$(sudo /usr/bin/wg show "${TLD}" allowed-ips)" || (
printf 'ERROR! Wireguard failed!\n' >>"${LOGFILE}"
exit 5; )
user_peers="$(grep "${1%[.:]*}" <<<"${wg_output}" 2>/dev/null)"