File size: 254 Bytes
560ee81
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

# Lets Encrypt
if [ -z "$DOMAIN" ]; then
 echo "You need to have \$DOMAIN set"
else
 if [ -f /etc/letsencrypt/live/${DOMAIN}/fullchain.pem ]; then
  certbot renew
  supervisorctl restart nginx
 else
  echo "There is no cert to renew"
 fi
fi