mirror of
https://github.com/NeoCloud/NeoNetwork
synced 2024-12-26 11:39:23 +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
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
FILE="dns/db.10.127"
|
||||||
TUN30_TEMP="$(mktemp)"
|
TUN30_TEMP="$(mktemp)"
|
||||||
PP_TEMP="$(mktemp)"
|
PP_TEMP="$(mktemp)"
|
||||||
LO_TEMP="$(mktemp)"
|
LO_TEMP="$(mktemp)"
|
||||||
|
@ -29,8 +30,8 @@ ipcalc()
|
||||||
|
|
||||||
# PROGRAM BEGIN
|
# PROGRAM BEGIN
|
||||||
|
|
||||||
sed -i '/AUTOGENERATED/,$d' dns/db.10.127
|
sed -i '/AUTOGENERATED/,$d' "$FILE"
|
||||||
echo '; AUTOGENERATED' >> dns/db.10.127
|
echo '; AUTOGENERATED' >> "$FILE"
|
||||||
|
|
||||||
(
|
(
|
||||||
cd route
|
cd route
|
||||||
|
@ -44,7 +45,7 @@ for i in *; do
|
||||||
print_record "$upstream_ip" "$DOWNSTREAM.$UPSTREAM.tun30.neo."
|
print_record "$upstream_ip" "$DOWNSTREAM.$UPSTREAM.tun30.neo."
|
||||||
print_record "$downstream_ip" "$UPSTREAM.$DOWNSTREAM.tun30.neo."
|
print_record "$downstream_ip" "$UPSTREAM.$DOWNSTREAM.tun30.neo."
|
||||||
) >> "$TUN30_TEMP"
|
) >> "$TUN30_TEMP"
|
||||||
elif [ "$TYPE" = "PP" ]; then
|
elif [ "$TYPE" = "PTP" ]; then
|
||||||
i="${i/PP,/}"
|
i="${i/PP,/}"
|
||||||
upstream_ip="${i%~*}"
|
upstream_ip="${i%~*}"
|
||||||
downstream_ip="${i#*~}"
|
downstream_ip="${i#*~}"
|
||||||
|
@ -68,6 +69,6 @@ done
|
||||||
sort -n < "$PP_TEMP"
|
sort -n < "$PP_TEMP"
|
||||||
echo -e "\n; Loopback Addresses"
|
echo -e "\n; Loopback Addresses"
|
||||||
sort -n < "$LO_TEMP"
|
sort -n < "$LO_TEMP"
|
||||||
} >> dns/db.10.127
|
} >> "$FILE"
|
||||||
|
|
||||||
rm -f "$TUN30_TEMP" "$PP_TEMP" "$LO_TEMP"
|
rm -f "$TUN30_TEMP" "$PP_TEMP" "$LO_TEMP"
|
||||||
|
|
Loading…
Reference in a new issue