Use a REGEX to detect if the public IP is WISP network
This commit is contained in:
parent
2e6297c11d
commit
127fd0f3ad
2 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
_IP=`curl -s api.ipify.org`
|
||||
echo $_IP > /tmp/my_ip
|
||||
if [ "$_IP" == "<%= @protokol_pub_ip %>" ] ;then
|
||||
if [[ $_IP =~ <%= @proto_pub_ip_regex %> ]] ;then
|
||||
_IP=`curl -s 10.0.200.100/ip.sh`
|
||||
echo $_IP >> /tmp/my_ip
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue