From 275ea5f0f659bb2fb31188bda7214e35d7ead2a8 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Fri, 17 Nov 2017 15:18:17 -0500 Subject: [PATCH] Certbot port fix --- nginx/letsencrypt-autogen.sh | 6 +++--- start.sh | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/nginx/letsencrypt-autogen.sh b/nginx/letsencrypt-autogen.sh index 8b657d54..2db44682 100644 --- a/nginx/letsencrypt-autogen.sh +++ b/nginx/letsencrypt-autogen.sh @@ -21,7 +21,7 @@ if [ -z $DOMAIN ]; then fi # Generate/update certificate -certbot certonly --work-dir ./letsencrypt --config-dir ./letsencrypt --logs-dir ./letsencrypt --standalone -d $DOMAIN --register-unsafely-without-email --agree-tos --keep +certbot certonly --tls-sni-01-port $WO_PORT --work-dir ./letsencrypt --config-dir ./letsencrypt --logs-dir ./letsencrypt --standalone -d $DOMAIN --register-unsafely-without-email --agree-tos --keep # Create ssl dir if necessary if [ ! -e ssl/ ]; then @@ -38,6 +38,6 @@ if [ -e ssl/cert.pem ]; then fi if [ -e "letsencrypt/live/$DOMAIN" ]; then - ln -vs "letsencrypt/live/$DOMAIN/privkey.pem" ssl/key.pem - ln -vs "letsencrypt/live/$DOMAIN/chain.pem" ssl/cert.pem + ln -vs "../letsencrypt/live/$DOMAIN/privkey.pem" ssl/key.pem + ln -vs "../letsencrypt/live/$DOMAIN/chain.pem" ssl/cert.pem fi \ No newline at end of file diff --git a/start.sh b/start.sh index 99df6b28..2e9905bc 100755 --- a/start.sh +++ b/start.sh @@ -64,6 +64,11 @@ export WO_PORT="${WO_PORT:=8000}" # Dump environment to .cronenv printenv > .cronenv +proto="http" +if [ "$WO_SSL" = "YES" ]; then + proto="https" +fi + (sleep 5; echo echo -e "\033[92m" echo "Congratulations! └@(・◡・)@┐" @@ -71,7 +76,7 @@ echo ========================== echo -e "\033[39m" echo "If there are no errors, WebODM should be up and running!" echo -e "\033[93m" -echo Open a web browser and navigate to http://$WO_HOST:$WO_PORT +echo Open a web browser and navigate to $proto://$WO_HOST:$WO_PORT echo -e "\033[39m" echo -e "\033[91mNOTE:\033[39m Windows users using docker should replace localhost with the IP of their docker machine's IP. To find what that is, run: docker-machine ip") &