webos-homebrew-channel
webos-homebrew-channel copied to clipboard
Startup script updates
Currently start-devmode.sh script is mostly used for early bootup. We want this to not be a symlink but a copy, in case homebrew channel gets accidentally removed. Currently this is (will be) manually deployed during exploit / first homebrew channel install, but there's no way of updating it.
This should be acomplished by comparing a sha256sum of app-bundled startup.sh to a checksum of start-devmode.sh script, and a popup should be shown on Homebrew Channel startup in case these don't match.
- [ ] Script sha256sum verification on Homebrew Channel startup
- [ ] UI popup with update confirmation
- [ ] Testing
sha256 seems like slight overkill, why not just diff? (i.e. read both files into a buffer and do string comparison)
Misphrased that, I meant "Homebrew Channel app startup".
Considering how small the script is, it shouldn't make any significant performance impact, and we happen to already have a single place to get a file sha256 checksum in the service done purely in nodejs, instead of calling any external tools.