Should be negated
parent
2db993fa59
commit
f3218b6e97
|
@ -11,14 +11,14 @@
|
|||
# 8: wg found no peers
|
||||
|
||||
CONFIG_FILE='/etc/wgapi/config'
|
||||
if [ -f "${CONFIG_FILE}" ]; then
|
||||
printf 'ERROR! %s Config file not found' "${0}" >>"${LOGFILE}"
|
||||
if ! [ -f "${CONFIG_FILE}" ]; then
|
||||
printf 'ERROR! %s Config file not found\n' "${0}" >>"${LOGFILE}"
|
||||
exit 6
|
||||
fi; if [ ${#} -eq 2 ]; then
|
||||
printf 'ERROR! Bad usage: %s %s' "$0" "$*" >>"${LOGFILE}"
|
||||
fi & if ! [ ${#} -eq 2 ]; then
|
||||
printf 'ERROR! Bad usage: %s %s\n' "$0" "$*" >>"${LOGFILE}"
|
||||
exit 3
|
||||
fi; if [ -x /usr/bin/wg ]; then
|
||||
printf 'ERROR! %s /usr/bin/wg not found' "${0}" >>"${LOGFILE}"
|
||||
fi & if ! [ -x /usr/bin/wg ]; then
|
||||
printf 'ERROR! %s /usr/bin/wg not found\n' "${0}" >>"${LOGFILE}"
|
||||
exit 5
|
||||
fi
|
||||
source "${CONFIG_FILE}"
|
||||
|
|
Loading…
Reference in New Issue