19 lines
889 B
Plaintext
19 lines
889 B
Plaintext
echo -e "Update Available. Install will begin in 30 seconds...\n\n"
|
|
echo -e "All local LAN Turtle data will be erased.\n\n"
|
|
echo -e "Press CTRL+C to CANCEL\n\n"
|
|
sleep 30
|
|
echo -e "Downloading Upgrade file\n\n"
|
|
wget -q -O /tmp/upgrade.bin http://downloads.lanturtle.com/turtle-2.bin
|
|
echo -e "Upgrade file downloaded. Verifying files.\n\n"
|
|
[[ "$(md5sum /tmp/upgrade.bin | awk '{print $1}')" == "479ebbb06ceea051d383d2e635a08e18" ]] && {
|
|
echo -e "DO NOT UNPLUG OR POWER DOWN THE LAN TURTLE\n\n"
|
|
echo -e "Upgrade in progress. Please wait ~5 minutes.\n"
|
|
echo -e "The LAN Turtle will reboot when the upgrade is complete.\n"
|
|
echo -e "This SSH session will now close.\n"
|
|
echo "sleep 10 && sysupgrade -n /tmp/upgrade.bin" | at now &> /dev/null
|
|
sleep 8 && clear
|
|
killall sshd
|
|
} || {
|
|
echo -e "MD5 checksum missmatch. Please try again."
|
|
}
|