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?

  • @[email protected]
    link
    fedilink
    English
    61 year ago

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

    • Mike WooskeyOP
      link
      fedilink
      English
      31 year ago

      That did it. Thanks, @[email protected]!

      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. :)