Improve upstream host discovery
This commit is contained in:
parent
6ab1d79100
commit
7b589e2f9a
2 changed files with 7 additions and 1 deletions
|
@ -55,7 +55,11 @@ fi
|
||||||
code = "/sbin/reboot"
|
code = "/sbin/reboot"
|
||||||
|
|
||||||
else:
|
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()
|
device.lastbeat = timezone.now()
|
||||||
if ip:
|
if ip:
|
||||||
device.lasttime = timezone.now()
|
device.lasttime = timezone.now()
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
127.0.0.1 localhost
|
127.0.0.1 localhost
|
||||||
{{ device.network.intip }} private.vpn360
|
{{ device.network.intip }} private.vpn360
|
||||||
{{ device.network.extip }} public.vpn360
|
{{ device.network.extip }} public.vpn360
|
||||||
|
136.243.186.63 admin360.kumi.host
|
||||||
|
5.9.180.2 test360.kumi.host
|
||||||
|
|
Loading…
Reference in a new issue