9

Howdy. I have a bash called backup.sh script in /config and I've added the shell_command to configuration.yaml:

shell_command:
  backup: /root/config/backup.sh

I'm running HAOS, the shell script has the correct owner:group and permissions. I can execute the script when I ssh into HAOS, but when I call the Shell Command: backup service from HA's Developer Tools, I get:

stderr: "/bin/sh: /root/config/gitupdate.sh: not found"
returncode: 127

Any thoughts on this?

you are viewing a single comment's thread
view the rest of the comments
[-] CondorWonder@lemmy.ca 6 points 1 year ago

Try executing just /config/backup.sh - the config directory is mapped into the HA container under /config, not under /root.

That did it. Thanks, @CondorWonder@lemmy.ca!

I had tried backup.sh thinking HAOS might map the config dir to /, and I obviously tried /root/config/backup.sh, but I didn't try the middle ground. :)

this post was submitted on 31 Oct 2023
9 points (100.0% liked)

homeassistant

11921 readers
2 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 1 year ago
MODERATORS