iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
various updates
[distro-setup]
/
vpn-static-ip
diff --git
a/vpn-static-ip
b/vpn-static-ip
index 8d04891667d64990acd8c2bd112d280fcf08260a..bef79330f453bc4992f3267cc6e779f38b16d29c 100755
(executable)
--- a/
vpn-static-ip
+++ b/
vpn-static-ip
@@
-15,9
+15,10
@@
conf=$1
main() {
while read -r host port; do
while read -r ip; do
main() {
while read -r host port; do
while read -r ip; do
+ echo $ip | egrep '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' &>/dev/null || continue
printf "remote %s %s\n" "$ip" "$port" >>$conf
ret=0
printf "remote %s %s\n" "$ip" "$port" >>$conf
ret=0
- done < <(dig +short $host ||:)
+ done < <(
timeout -s 9 1
dig +short $host ||:)
done < <(sed -rn 's/^ *# *remote //p' $conf)
}
done < <(sed -rn 's/^ *# *remote //p' $conf)
}