Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106380

Shell Command problem

$
0
0

Hi!
So Im having some trouble working with shell commands… this is my config:

shell_command:
  push_config_github: /bin/bash push.sh
  push_backups_github: /bin/bash push_backups.sh

So my push.sh is this:

cd /config
git add .
git commit -m "Config files on `date +'%d-%m-%Y %H:%M:%S'`"
git push -u origin main

So this one works perfect and pushes to github without problem…
The other push_backups.sh

cd ~/backup
git add .
git commit -m "Backup file on `date +'%d-%m-%Y %H:%M:%S'`"
git push -u origin backups

So, I get this error on the logs with this one:

Logger: homeassistant.components.shell_command
Source: /usr/src/homeassistant/homeassistant/components/shell_command/__init__.py:115
Integration: Shell Command (documentation, issues)
First occurred: 13:09:05 (1 occurrences)
Last logged: 13:09:05

Error running command: `/bin/bash push_backups.sh`, return code: 1
NoneType: None

The thing is, If i execute /bin/bash push_backups.sh on the terminal (Terminal & SSH add-on) it works perfect and pushes to github… :confused:

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106380

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>