Run bash script at startup

Ohhh! It’s not really advanced. You simply create this file:

/zynthian/config/user_config.sh

with this content:

#!/bin/bash

# Wait until zynthian-ui is loaded
while [[ "$(pgrep -f zynthian_main.py)" == "" ]]; do
     sleep 0.1
done

# You code here!!!

Don’t forget to give the right permissions to the file:

chmod a+x /zynthian/config/user_config.sh

And that’s all!

Best regards,

3 Likes