My HASSIO (v.0.76.0) docker container is running happily on an Intel NUC, with Ubuntu Server 18.04 as base OS.
Because the lovely Dropbox Sync add-on (made by Daniel Welch) is not working for me (and others), I want to run the underlying dropbox_uploader.sh script as a shell_command service.
Therefore, I copied the script and .dropbox_uploader file to the location where I land when SSH-ing into HASSIO. The file is containing the credentials when you run it for the first time.
It needs to be on a location that is persistent after a reboot, else you need to provide the credentials every time you run it.
However, I do run into an issue when trying to run the command as a shell_command service.
The command itself works ok when I run it in a SSH Terminal.
./dropbox_uploader.sh -f .dropbox_uploader -s upload /backup/*.tar "/hassio/"
I added the following shell_command to my configuration.yaml to be able to call it as a service.
shell_command:
dropbox_uploader: '/bin/bash ./dropbox_uploader.sh -f dropbox_uploader -s upload /backup/*.tar "/hassio/"'
When calling the service, it fails with the following error in the log:
ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `/bin/bash ./dropbox_uploader.sh -f .dropbox_uploader -s upload /backup/*.tar "/hassio/"`, return code: 1 NoneType: None
I tried several ways to write the command in the configuration, with and without ‘…’, with and without /bin/bash in front of it. Etc…
Searching did not provide me with a solution however, I tried everything that was suggested. Also found one very similar thread with the same behavior with no follow up or solution.
I am a little lost here, any suggestions?