Created
February 4, 2016 18:14
-
-
Save shmick/8234e45f4a896b06fcce to your computer and use it in GitHub Desktop.
This file contains 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 | |
if [[ $EUID -ne 0 ]] | |
then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
OUTPUT=$(/usr/local/etc/letsencrypt.sh/letsencrypt.sh -c) | |
echo "$OUTPUT" | grep Renewing | |
if [ $? = 0 ] | |
then | |
service nginx reload | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment