Fixed sudos
parent
3160485a43
commit
d4fb5caf98
|
@ -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}"
|
||||
|
||||
|
|
Loading…
Reference in New Issue