Improve upstream host discovery

This commit is contained in:
Kumi 2019-02-10 13:18:55 +00:00
parent 6ab1d79100
commit 7b589e2f9a
2 changed files with 7 additions and 1 deletions

View file

@ -55,7 +55,11 @@ fi
code = "/sbin/reboot"
else:
code = ""
code = """
. /etc/vpnsecret
/usr/bin/wget -O/etc/hosts https://$HOSTNAME/hosts --post-data "secret=$SECRET" --no-check-certificate >/var/log/wget 2>&1
"""
device.lastbeat = timezone.now()
if ip:
device.lasttime = timezone.now()

View file

@ -1,3 +1,5 @@
127.0.0.1 localhost
{{ device.network.intip }} private.vpn360
{{ device.network.extip }} public.vpn360
136.243.186.63 admin360.kumi.host
5.9.180.2 test360.kumi.host