mirror of
https://github.com/NeoCloud/NeoNetwork
synced 2024-11-26 00:00:42 +08:00
DNS: generator: PP -> PTP
This commit is contained in:
parent
24b6b066eb
commit
4a4bffc3a2
1 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
FILE="dns/db.10.127"
|
||||
TUN30_TEMP="$(mktemp)"
|
||||
PP_TEMP="$(mktemp)"
|
||||
LO_TEMP="$(mktemp)"
|
||||
|
@ -29,8 +30,8 @@ ipcalc()
|
|||
|
||||
# PROGRAM BEGIN
|
||||
|
||||
sed -i '/AUTOGENERATED/,$d' dns/db.10.127
|
||||
echo '; AUTOGENERATED' >> dns/db.10.127
|
||||
sed -i '/AUTOGENERATED/,$d' "$FILE"
|
||||
echo '; AUTOGENERATED' >> "$FILE"
|
||||
|
||||
(
|
||||
cd route
|
||||
|
@ -44,7 +45,7 @@ for i in *; do
|
|||
print_record "$upstream_ip" "$DOWNSTREAM.$UPSTREAM.tun30.neo."
|
||||
print_record "$downstream_ip" "$UPSTREAM.$DOWNSTREAM.tun30.neo."
|
||||
) >> "$TUN30_TEMP"
|
||||
elif [ "$TYPE" = "PP" ]; then
|
||||
elif [ "$TYPE" = "PTP" ]; then
|
||||
i="${i/PP,/}"
|
||||
upstream_ip="${i%~*}"
|
||||
downstream_ip="${i#*~}"
|
||||
|
@ -68,6 +69,6 @@ done
|
|||
sort -n < "$PP_TEMP"
|
||||
echo -e "\n; Loopback Addresses"
|
||||
sort -n < "$LO_TEMP"
|
||||
} >> dns/db.10.127
|
||||
} >> "$FILE"
|
||||
|
||||
rm -f "$TUN30_TEMP" "$PP_TEMP" "$LO_TEMP"
|
||||
|
|
Loading…
Reference in a new issue