Trying to automate ssl cert renewal - the script works fine when ran manually via terminal add-on, but when trying to run it from an automation it says" Action ran successfully" but the script doesn't run.
automation:
description: ""
triggers:
- trigger: calendar
entity_id: calendar.calendar_my_local
event: start
offset: "0:0:0"
id: trigger1
conditions:
- condition: template
value_template: "{{ trigger1.calendar_event.summary == 'SSL Certificate Renewal' }}"
actions:
- action: shell_command.renew_ssl_certificate
data: {}
mode: single```
**configuration.yaml entry:**
```shell_command:
renew_ssl_certificate: /bin/bash /root/homeassistant/certbot/renewSSL.sh```
**bash script (anonymised):**
```#!/bin/bash
#renew certificate
certbot --manual certonly --preferred-challenges dns -d "haos.mydomain.com" --email myemail@mailprovider.com
#Saving debug log to /var/log/letsencrypt/letsencrypt.log
#migrate files
cp /etc/letsencrypt/archive/haos.mydomain.com/cert1.pem /root/homeassistant/certbot/cert.pem
cp /etc/letsencrypt/archive/haos.mydomain.com/chain1.pem /root/homeassistant/certbot/chain.pem
cp /etc/letsencrypt/archive/haos.mydomain.com/fullchain1.pem /root/homeassistant/certbot/fullchain.pem
cp /etc/letsencrypt/archive/haos.mydomain.com/privkey1.pem /root/homeassistant/certbot/privkey.pem```