Hey guys,
I have two shell commands in my environment. The first one runs perfectly, but the second one isn’t. I receive an error message:
Error running command: `/bin/bash /config/cfg/script/delete_old_backups.sh`, return code: 1
This is the content of shell_commands and the script itself.
### shell_commands ###
delete_old_backups: 'bash /config/cfg/script/delete_old_backups.sh'
### delete_old_backups.sh script ###
#!/bin/bash
find /backup/* -mtime +3 -exec rm {} \;
Full error message:
Error running command: `bash /config/cfg/script/delete_old_backups.sh`, return code: 1
7:47 AM /usr/lib/python3.6/site-packages/homeassistant/components/shell_command.py (ERROR)
I’ve checked the forum and there’s a number of issues with shell commands under HASSIO, but the first script is very similar in the way it’s called but executes fine.
I’m sure it’s something simple I’m missing but really could use some guidance.
Cheers!