iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lots: shellcheck, streaming stuff, fixes
[distro-setup]
/
vpn-static-ip
diff --git
a/vpn-static-ip
b/vpn-static-ip
index bef79330f453bc4992f3267cc6e779f38b16d29c..8ecce1c8ce83aba53fc381fbc74e56ad47dd149b 100755
(executable)
--- a/
vpn-static-ip
+++ b/
vpn-static-ip
@@
-15,7
+15,7
@@
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
+ echo $ip |
grep -E
'[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' &>/dev/null || continue
printf "remote %s %s\n" "$ip" "$port" >>$conf
ret=0
done < <(timeout -s 9 1 dig +short $host ||:)
printf "remote %s %s\n" "$ip" "$port" >>$conf
ret=0
done < <(timeout -s 9 1 dig +short $host ||:)