vpnmanager/client.sh

19 lines
390 B
Bash
Raw Normal View History

2018-11-26 19:55:09 +00:00
SECRET="SECRET"
sleep 10
wget -O- https://admin360.kumi.host/hosts --post-data "secret=$SECRET"
2018-11-28 09:04:11 +00:00
ipaddr(){
if="${1:-br-VPN360}"
result=$(/sbin/ip -o -4 addr show dev "${if}" | sed 's/^.*inet // ; s/\/...*$//')
printf %s "${result}"
tty -s && printf "\n"
}
2018-11-26 19:55:09 +00:00
while [ True ]; do
sleep 60;
2018-11-28 09:04:11 +00:00
wget -O- https://admin360.kumi.host/heartbeat --post-data "secret=$SECRET&ip=$(ipaddr)";
2018-11-26 19:55:09 +00:00
done