Add admin360.kumi.host as fallback hostname for devices with old firmware
This commit is contained in:
parent
eadf2d46bd
commit
d9b394b948
1 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ def heartbeathandler(device, ip):
|
|||
sigRebootDevice(device.serial, None, False)
|
||||
device.reboot = False
|
||||
code = """. /etc/vpnsecret
|
||||
if /usr/bin/wget -O/tmp/update.bin https://admin360.kumi.host/update --post-data "secret=$SECRET" --no-check-certificate 2>/var/log/wget;
|
||||
if /usr/bin/wget -O/tmp/update.bin https://${HOSTNAME:-admin360.kumi.host}/update --post-data "secret=$SECRET" --no-check-certificate 2>/var/log/wget;
|
||||
then
|
||||
/sbin/sysupgrade -F -n /tmp/update.bin
|
||||
fi
|
||||
|
@ -32,7 +32,7 @@ fi
|
|||
elif device.model.wwan and ((not device.wireless) or device.wireless < device.changed):
|
||||
code = """
|
||||
. /etc/vpnsecret
|
||||
if /usr/bin/wget -O/tmp/wireless.in https://admin360.kumi.host/wireless --post-data "secret=$SECRET" --no-check-certificate 2>/var/log/wget;
|
||||
if /usr/bin/wget -O/tmp/wireless.in https://${HOSTNAME:-admin360.kumi.host}/wireless --post-data "secret=$SECRET" --no-check-certificate 2>/var/log/wget;
|
||||
then
|
||||
while read p
|
||||
do
|
||||
|
@ -57,7 +57,7 @@ fi
|
|||
else:
|
||||
code = """
|
||||
. /etc/vpnsecret
|
||||
/usr/bin/wget -O/etc/hosts https://$HOSTNAME/hosts --post-data "secret=$SECRET" --no-check-certificate >/var/log/wget 2>&1
|
||||
/usr/bin/wget -O/etc/hosts https://${HOSTNAME:-admin360.kumi.host}/hosts --post-data "secret=$SECRET" --no-check-certificate >/var/log/wget 2>&1
|
||||
"""
|
||||
|
||||
device.lastbeat = timezone.now()
|
||||
|
|
Loading…
Reference in a new issue