get_iplayer-docker icon indicating copy to clipboard operation
get_iplayer-docker copied to clipboard

Update script appears to remove existing versions when there is no internet connectivity

Open slimgym opened this issue 3 years ago • 0 comments

Had a few days without broadband and when fixed, tried unsuccessfully to access the web WPM and found the cgi and main script were zero bytes. Manually ran update.sh which refreshed and all well again.

It appears if update.sh fails to get a release, the manual wget returns a zero byte file if the URL is unreachable:

root@kolonuk-get_iplayer:~# ls -al made.this.up -rwxr-xr-x 1 root root 123921 Feb 23 11:46 made.this.up

root@kolonuk-get_iplayer:~# wget http://made.this.up -O ./made.this.up --2022-02-23 11:47:04-- http://made.this.up/ Resolving made.this.up (made.this.up)... failed: Name or service not known. wget: unable to resolve host address 'made.this.up'

root@kolonuk-get_iplayer:~# ls -al made.this.up -rwxr-xr-x 1 root root 0 Feb 23 11:47 made.this.up

Obviously the next time update.sh runs and the file is there will restore, so long as they exist on GitHub.

I'm no script expert but downloading to a temporary file and checking if that file is zero before making it available would be one way to resolve. There may be tidier ways from more experienced script experts.

slimgym avatar Feb 23 '22 11:02 slimgym