I’d like to have a custom script (that changes an LED behavior) when Volumio is ready.
There are 2 ways to do so:
- a script call when Volumio startup sound plays
- a systemd service (managed by OS)
With option (1) I’ll be sure that the script runs when Volumio is actually up and running. But I probably need to tweak Volumio code. First, I don’t know where to look; second, I (probably) need to re-apply the tweak on every update.
Option (2) is easier to implement and cleaner. To have it almost synced with Volumio “ready status” I need to set an “after volumio” directive in the systemd script. It will probably start a little early (not when Volumio is ready ready), but for a simple status LED it will probably be good enough (I’ll do some test in a couple of days).
I’ll also use this approach to change the LED behavior on poweroff/reboot.
What are your thoughts? What’s the best way to have a script run when Volumio is ready? Further/better ways to do so?