diff --git a/manager/device.py b/manager/device.py index 7dcbb51..279de11 100644 --- a/manager/device.py +++ b/manager/device.py @@ -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() diff --git a/templates/manager/hosts b/templates/manager/hosts index 5f97a4e..9430565 100644 --- a/templates/manager/hosts +++ b/templates/manager/hosts @@ -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