Hi All,
This script I can run without errors on SSH inside de HassOS:
#!/bin/bash
sudo -u root docker exec -t addon_77b2833f_timescaledb pg_dumpall -c -U postgres > /root/share/dump_`date +%d-%m-%Y-%H_%M_%S`.sql
Created several possible options to create schell_commands:
postgres_backup1: "bash /share/postgres_backup.sh"
postgres_backup2: "bash -c /share/postgres_backup.sh"
postgres_backup3: "/bin/bash /share/postgres_backup.sh"
postgres_backup4: "/bin/bash -c /share/postgres_backup.sh"
postgres_backup5: "bash -c /share/postgres_backup.sh"
None of them are working see errors below:
2021-10-24 19:29:16 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `bash /share/postgres_backup.sh`, return code: 1
NoneType: None
2021-10-24 19:29:24 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `bash -c /share/postgres_backup.sh`, return code: 1
NoneType: None
2021-10-24 19:29:30 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `/bin/bash /share/postgres_backup.sh`, return code: 1
NoneType: None
2021-10-24 19:29:36 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `/bin/bash -c /share/postgres_backup.sh`, return code: 1
NoneType: None
2021-10-24 19:29:42 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `bash -c /share/postgres_backup.sh`, return code: 1
NoneType: None
What can I do to let this work?