Fixed sudos

master
Keith Irwin 2022-09-09 22:54:16 -06:00
parent 3160485a43
commit d4fb5caf98
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 0 additions and 5 deletions

View File

@ -7,7 +7,6 @@
# 4: wg binary not found
# 5: vars not found
# 6: wg command failed
# 7: Not root
CONFIG_FILE='/etc/wgapi/config'
[ "$#" == "3" ] || (
@ -18,10 +17,6 @@ CONFIG_FILE='/etc/wgapi/config'
printf '/usr/bin/wg not found\n' >>"${LOGFILE}"
exit 4
)
(( EUID == 0 )) || (
printf '%s must be run as root\n' "${0}" >>"${LOGFILE}"
exit 7
)
[ -f "${CONFIG_FILE}" ] || exit 5
source "${CONFIG_FILE}"