Try process substitution fix
parent
6908b71140
commit
f49d24cdcf
|
@ -20,6 +20,10 @@ CONFIG_FILE='/etc/wgapi/config'
|
|||
[ -f "${CONFIG_FILE}" ] || exit 5
|
||||
source "${CONFIG_FILE}"
|
||||
|
||||
# Fix process substitiution if needed
|
||||
# https://askubuntu.com/a/1250789
|
||||
[ -d '/dev/fd' ] || ln -s '/proc/self/fd' '/dev/fd'
|
||||
|
||||
set -x
|
||||
res="$(sudo /usr/bin/wg set "${TLD}" peer "${1}" preshared-key <(printf '%s\n' "${2}") allowed-ips "${3}" 2>&1)" || (
|
||||
printf '%s %s\n' "${?}" "${res}" >>"${LOGFILE}"
|
||||
|
|
Loading…
Reference in New Issue