Hey everyone,
to fix a broken addon, I need to run this command after the device reboots:
docker tag triamazikamno/aarch64-addon-gosungrow:3.0.7 ba22da74/aarch64-addon-gosungrow:3.0.7
I run a native HAOS instance on an Odroid C4.
Running the command manually in the Advanced SSH addon with protected mode disabled works, but now I need to run this command after a reboot, because unfortunately the retagging of the images does not persist a reboot.
As cron
does not work, the proper solution would be to run an automation and execute the command in this automation.
I tried to create a shell_command
which runs the command directly:
shell_command:
fix_gosungrow: /usr/local/bin/docker tag triamazikamno/aarch64-addon-gosungrow:3.0.7 ba22da74/aarch64-addon-gosungrow:3.0.7
This does not work. Then I wrote a script in /config/fix_gosungrow.sh
, and changed permissions so this can be executed:
#!/bin/bash
/usr/local/bin/docker tag triamazikamno/aarch64-addon-gosungrow:3.0.7 ba22da74/aarch64-addon-gosungrow:3.0.7
The shell command was then changed to:
shell_command:
fix_gosungrow: /config/fix_gosungrow.sh
I also tried
shell_command:
fix_gosungrow: /bin/bash /config/fix_gosungrow.sh
Neither worked…
Then I tried to send the command to the stdio
of the ssh-addon, but this also does not work… And now I don’t know what else I could try… I assume the problem lies in the fact that the docker
command needs root permissions, and the shell_command
does not provide that.
So, how the heck can I make HAss run this command after a reboot?
Best regards,
Spatz