Shell_command in docker not working

Hi Folks,
So I have Godaddy and that doesnt come with DDNS. I have certs all set up and external connectivity is working great. I dont have a fixed IP, but it barely changes (but when it does its annoying!).

So I found this: https://github.com/lmammino/godaddy-dns
I run it with the accompanying json file and boom it updates my godaddy A records :slight_smile:
(instead of a cron I use node-red to compare, and only run the .bin file if I need to).

It worked in 0.85 and now something isnt happy as I get this:

2019-01-27 16:57:26 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `./config/includes/shell/godaddy-dns-linux.bin`, return code: 127
NoneType: None

I’m running in a docker, so when I run the file from inside the docker, it works fine.
docker exec -it home-assistant /bin/bash
then:
./godaddy-dns-linux.bin --config .godaddy-dns.json
= winning

however when using a shell_command as shown above it does not work.

shell_command:
  godaddy: ./godaddy-dns-linux.bin

its executable and right now by anyone.
I’ve tried every combination of paths I can think of, but it just wont run.

Can someone assist? whats the shell_command directory it starts from?

so turns out thanks to @cwhits

bash -c /config/path/to/godaddy-dns-linux.bin

1 Like

In my shell commands I aswell use ‘bash -c /config/path/to/shell_commands.sh’. However in .bashrc ‘echo $PATH’ includes /config/path/to/.

Is there a way to have these shell_commands in hass working without the /config/path/to pre-fix.

Thanks.

@jaburges I am running HassOS 2021.1.7. How did you accomplish the above? I am very interested in doing this too.

Info above - but i’m now using a docker container that takes care of it :slight_smile:

Where can I find a docker image for this?

jwater7/godaddy-publicip-updater - Docker Hub
There is an Unraid commuity App if you use that too

1 Like

Hi
I had same problem
I found the problem, just need to correct paths
Go to Docker HA terminal, lookout paths
here is my configuration.yaml
shell_command:
copy_latestmotion: ‘cp /surveillance/@Snapshot/@PushServ/* /config/www/Motion/’