tf318 / lg

LG webos tools
26 stars 4 forks source link

Use `/var/lib/webosbrew/init.d` #1

Closed DavidBuchanan314 closed 2 years ago

DavidBuchanan314 commented 2 years ago

Scripts placed in /var/lib/webosbrew/init.d will be run automatically by the Homebrew Channel startup script, on boot. This is probably going to be a more reliable and future-proof way of doing things.

tf318 commented 2 years ago

Thanks for the suggestion David.

I did start out with a separate script in that directory, rather than amending the Homebrew Channel's startup script directly, but when experimenting I found my script did not always run. Following your comment, I read the documentation for run-parts and saw that a . in the filename of a script means that script will not be executed.

I had given the script a .sh suffix, which explains why it never ran when placed in /var/lib/webosbrew/init.d!

Have reworked the setup script to follow your suggestion. Works well, and is indeed much cleaner. Fixed now - see eb55b0e678cdc4d946c9c9534334994f127b6242.