I want to run my own command line bash script located in /srv/ folder.
Unfortunately Supervised Home Assistant can’t run the script and in logs I see only the message “/bin/sh: /srv/test.sh: not found”.
The script has 755 root:root permission and can be executed by any user on the server by using command line.
Why HA can’t execute it and how to make it working correctly?
If you’re running supervised, the HA container can’t access your /srv folder.
Put your script in a folder that HA can access and shares with your OS. Normaly the /config folder.
Not sure where this is in a supervised installation.
Try ro find it on your OS with:
find / -iname '*configuration.yaml*'
and if there are multiple locations, test them by editing a file in there.
EDIT: To test your script inside the HA container read here:
Bash script located in the same folder as configuration.yaml also doesn’t work.
I can run Python scripts from above folder but not shell and I don’t have an idea why…
Finally I’ve decided to use Python scripts instead.