rxfr isn't a thing
parent
5a80881f25
commit
734f48022b
|
@ -35,7 +35,7 @@ elif ! [[ ${#username} -ge 3 ]]; then
|
|||
fi
|
||||
|
||||
# Check if user already exists
|
||||
if /usr/lib/wgapi/ns_lookup_rxfr | grep ".${username}.${TLD}" >/dev/null; then
|
||||
if /usr/lib/wgapi/ns_lookup_axfr | grep ".${username}.${TLD}" >/dev/null; then
|
||||
printf 'User %s already exists!\n' "${username}" | tee >(cat 1>&2) | /usr/lib/wgapi/http_res 409
|
||||
exit
|
||||
fi
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
# FILE: ips_to_peers
|
||||
# DESCRIPTION: Takes a list of IPs from wg show allowed-ips
|
||||
# and adds domains using rxfr lookups
|
||||
# and adds domains using axfr lookups
|
||||
# USAGE: ips_to_peers json <<<"${user_peers}"
|
||||
# ERRORS:
|
||||
# 3: bad usage
|
||||
|
@ -13,7 +13,7 @@ source /etc/wgapi/config
|
|||
format="${1}"
|
||||
|
||||
# Perform AXFR lookup
|
||||
res="$(/usr/lib/wgapi/ns_lookup_rxfr)" || exit 4
|
||||
res="$(/usr/lib/wgapi/ns_lookup_axfr)" || exit 4
|
||||
|
||||
# This should read from stdin
|
||||
# TODO: Run this loop in parallel
|
||||
|
|
Loading…
Reference in New Issue