I switched over to mac from my RPi, and my command line sensor checking SSL certificate stopped working. However, this command works from the command line without sudo, both inside and outside of the venv. Permissions are all ok (not using a separate homeassistant user, but HA runs as root anyway).
Config:
- platform: command_line
name: SSL expiry date
unit_of_measurement: days
scan_interval: 10800
command: “/private/var/root/.homeassistant/ssl-cert-check -b -c /etc/letsencrypt/live/mydomainname.duckdns.org/cert.pem | awk ’{ print $NF }’”
Error in log:
/bin/sh: “/private/var/root/.homeassistant/ssl-cert-check: No such file or directory
…it seemed like the initial double quote is being interpreted as part of the path, so I tried escaping various combinations of spaces without the double quotes and that didn’t work. So, I copied ssl-cert-check into homeassistant/bin and referenced it without the path in the config, and now I get:
/bin/sh: “ssl-cert-check: command not found
Someone please tell me what I’m doing wrong??