thanks, looks good.
be aware that un tar-ing takes some time on the rpi
I edited this for use on my personal server
also, you could add this script to autostart.sh like this
#!/bin/sh
(sleep 60;
./storage/downloads/update_script)&
then at the end you could remove reboot and append
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"id":1,"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Update Available","message":"Please Reboot When Ready To Update","displaytime":8000}}' http://localhost:80/jsonrpc
this would allow it to update when booting normally then it would update when reboots. This may cause problems though if the system loses power midway of the update, hmm. I may add an if statement to check if the file is already downloaded...