[openwrt] add support for teltonika

This commit is contained in:
Nico Schottelius 2022-01-26 17:27:11 +01:00
parent 394ed308c9
commit d77ce797fd

View file

@ -0,0 +1,29 @@
#!/bin/sh
# Nico Schottelius, 2022-01-26
if [ $# -ne 1 ]; then
echo "$0 address"
echo " address: connect to this address (often: 192.168.1.1)"
exit 1
fi
set -x
filename=RUT2_R_00.07.01.2_WEBUI.bin
device_ip=$1; shift
while ! ping -c1 ${device_ip}; do
echo "Cannot ping $device_ip yet - waiting"
sleep 1
done
if echo $device_ip | grep -q :; then
scp_ip="[$device_ip]"
else
scp_ip="$device_ip"
fi
wget -c https://wiki.teltonika-networks.com/wikibase/images/8/85/${filename}
scp ${filename} root@${scp_ip}:/tmp
ssh root@${device_ip} "sysupgrade -n /tmp/*.bin"