yWeb/Y_About_Image: fix check for updates

Origin commit data
------------------
Branch: ni/coolstream
Commit: 801a0788a4
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-03-17 (Fri, 17 Mar 2023)

Origin message was:
------------------
- yWeb/Y_About_Image: fix check for updates

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2023-03-17 21:20:16 +01:00
parent c8acbe720e
commit 351eb6489e
3 changed files with 15 additions and 16 deletions

View File

@@ -687,11 +687,14 @@ case "$action" in
;;
get_update_txt)
version="n/a"
#FIXME align url to box specs
wget -O /tmp/release.txt "http://neutrino-images.de/neutrino-images/update.php"
test -e /tmp/release.txt && version=$(cat /tmp/release.txt | grep ".img" | cut -d" " -f2)
revision=$1
boxname=${2// /%20}
chip_type=$3
image_type=$4
wget -O /tmp/${image_type}.txt "https://neutrino-images.de/neutrino-images/update.php?revision=$revision&boxname=$boxname&chip_type=$chip_type&image_type=$image_type"
test -e /tmp/${image_type}.txt && version=$(cat /tmp/${image_type}.txt | cut -d" " -f2)
echo "version=${version// /}" > /tmp/update.txt
rm -f /tmp/release.txt
rm -f /tmp/${image_type}.txt
;;
rm_update_txt)
rm -f /tmp/update.txt