I believe a plugin will always run before the startup sound, but… I’m kind of interested, because I have a plugin that preferably run after the startup sound.
Thanks RDaneel, that works perfectly. For reference sakes, the timing is in the order of miliseconds before the sound plays.
However I have encountered a slightly strange behavior. For simplicity, the script is simply pulling a LED high with python and RPi.GPIO. A few seconds after booting, the LED turns off. On the other hand if I run the script manually it stays on permanently (aka I only tested longer than a few minutes). I’m not sure if this has something with how the script is written or how it is initialized as a service. I’ve pasted the script’s code below, service file is exactly as linked.
In the current version of volumio, the path of bash is /bin/bash
Also, remember to set the permission of your script by chmod +x /usr/bin/yourscript.sh