Skip to content

Commit

Permalink
fix startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Noogen committed Feb 13, 2017
1 parent 429b47f commit 84f9fc6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions files/root/bin/my-startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ if [ -n "$DOMAINS" ] ; then

# only generate domain if not exists
if [ ! -f /etc/letsencrypt/live/$MYDOMAIN/fullchain.pem ]; then
# wait for nginx to start
sleep 2
# output is not success then exit
if test $(./le-run.sh | tee ../letsencrypt.init.log | grep -c 'Congratulations') -eq 0; then
echo "letsencrypt failed"
exit 1
echo "letsencrypt failed, please restart docker or rerun /root/le-run.sh"
exit 0
fi

echo "reloading domain ssl"
Expand Down

0 comments on commit 84f9fc6

Please sign in to comment.