Skip to content

Instantly share code, notes, and snippets.

@kuttumiah
Created August 8, 2021 00:58
Show Gist options
  • Save kuttumiah/262286c8cd07c43da96ab4fea84ac905 to your computer and use it in GitHub Desktop.
Save kuttumiah/262286c8cd07c43da96ab4fea84ac905 to your computer and use it in GitHub Desktop.
Perform certbot renewal and log the output for audit/debug functionality.
#!/bin/bash
# Log the time of the job
echo $(date -I'seconds') >>/home/ec2-user/certbot-renew.log 2>&1
# Run renewal command
certbot renew --no-self-upgrade >>/home/ec2-user/certbot-renew.log 2>&1
echo >>/home/ec2-user/certbot-renew.log 2>&1
echo >>/home/ec2-user/certbot-renew.log 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment