theypsilon / Update_All_MiSTer

All-in-one script for updating your MiSTer
GNU General Public License v3.0
605 stars 27 forks source link

Updating removes scripts from /etc/init.d #86

Closed tatsutron closed 2 years ago

tatsutron commented 2 years ago

(This might not be an issue per se- apologies if that's the case, we're out of our depth in this area.)

We work on a mobile app which communicates with the MiSTer to launch games, display metadata/artwork etc. Previously all the communication was done over SSH but recently we added a barebones bottlepy server on the MiSTer side of things which gives us a lot more flexibility going forward (for now it pretty much just generates on-demand MGL files). Anyway, we've been using /etc/init.d to ensure that once installed, the server starts up alongside the MiSTer. After running update_all, the file we'd added to /etc/init.d was gone.

If you don't mind a few questions, 1) does this make sense, is it expected behavior?, 2) can this be solved by changing update_all in some way, or is that a non-starter?, and 3) would it be within the realm of possibility to include this thing as an opt-in within update_all itself? From our perspective it'd be amazing if we could eliminate the extra step for our users of having to install (and update) the server bit separately altogether.

Sorry if this is spam, and thanks for your time.

theypsilon commented 2 years ago

1) Yes, it's the result of updating Linux, which overrides everything outside of /media/ 2) It's not an update_all thing, it's the way Linux update story works on MiSTer. Fortunately, there is something for start-up services that should persist between Linux updates. They need to be handled at /media/fat/linux/user-startup.sh instead. 3) Your update script could be distributed with a Downloader database: https://github.com/MiSTer-devel/Downloader_MiSTer/blob/main/docs/custom-databases.md . Take a look at MiSTerSAM to see how they distribute their updater and how they update the database with a workflow that updates the file hashes. This is the future-proof way to distribute content with update_all and downloader.

Love your project! Lots of luck with it!

tatsutron commented 2 years ago

Thank you so much for this exceedingly helpful reply (and the kind words :)).