Skip to content

Instantly share code, notes, and snippets.

@shmick
Created February 4, 2016 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shmick/8234e45f4a896b06fcce to your computer and use it in GitHub Desktop.
Save shmick/8234e45f4a896b06fcce to your computer and use it in GitHub Desktop.
#!/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