projects
/
webi-installers
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
webi in titles
[webi-installers/.git]
/
myip
/
myip.sh
1
#!/bin/bash
2
3
{
4
set -e
5
set -u
6
7
ipv4=$(curl -s https://api.ipify.org)
8
ipv6=$(curl -s https://api6.ipify.org)
9
10
if [ -n "$ipv4" ]; then
11
echo "IPv4 (A) : $ipv4"
12
fi
13
14
if [ -n "$ipv6" ] && [ "ipv6" != "ipv4" ]; then
15
echo "IPv6 (AAAA): $ipv6"
16
fi
17
}