ispysoftware / agent-install-scripts

Setup scripts for Agent DVR
GNU General Public License v3.0
25 stars 7 forks source link

Faulty download location (returns HTTP 404 and download fails) #38

Closed davison closed 1 year ago

davison commented 1 year ago

Describe the bug

d/l fails on RasPi (arch=armv7l)

$ bash -x <(curl -s "https://raw.githubusercontent.com/ispysoftware/agent-install-scripts/main/v2/download.sh")
++ uname -m
+ arch=armv7l
++ arch
+ echo 'finding installer for armv7l'
finding installer for armv7l
+ purl='https://www.ispyconnect.com/api/Agent/DownloadLocation4?platform=Linux64&fromVersion=0'
+ [[ linux-gnueabihf == \d\a\r\w\i\n* ]]
+ case $(arch) in
++ arch
+ purl='https://www.ispyconnect.com/api/Agent/DownloadLocation2?platform=LinuxARM&fromVersion=0'
++ curl -s --fail 'https://www.ispyconnect.com/api/Agent/DownloadLocation2?platform=LinuxARM&fromVersion=0'
++ tr -d '"'
+ AGENTURL=
+ Filename=
+ '[' -f ']'
+ echo 'Latest file already downloaded ()'
Latest file already downloaded ()
+ exit

Almost certainly line 31 on the download script is wrong (presume this should point to DownloadLocation4 and not DownloadLocation2)

https://github.com/ispysoftware/agent-install-scripts/blob/dc066df522775f1425ec7870fcf4eed7ca805234/v2/download.sh#L31

ispysoftware commented 1 year ago

We don't have a raspberry pi 32 bit arm compatible pre-build of ffmpeg v6 yet you'll need to use the docker instead

https://hub.docker.com/r/mekayelanik/ispyagentdvr

davison commented 1 year ago

got it.. don't think it alters the fact that the bug exists in the script (the output tells you the latest file is already downloaded when it isn't). I worked around this by just pulling the zip from the other location and extracting over the top of my old install as advised.

On the ffmpeg part, I simply grabbed your sources and built it on the Pi inside the main Agent directory. It's working fine :)

ispysoftware commented 1 year ago

yeah you're right there :)

fixed https://github.com/ispysoftware/agent-install-scripts/blob/main/v2/download.sh