Created
May 3, 2018 06:54
-
-
Save jverweijL/1f335996ff758de355dcafb82231e85a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo certbot renew --dry-run | |
read -e -p "Install new certificate? " -i "yes" answer | |
if [ "$answer" = "yes" ]; then | |
sudo certbot renew; # Fetches new certificate | |
fi | |
read -e -p "Restart nginx? " -i "yes" answer | |
if [ "$answer" = "yes" ]; then | |
sudo systemctl restart nginx; # Restart nginx | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment