From 81cfe975b4a040b5997456679291fbf5fa8cab08 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 23 Jul 2021 23:45:58 -0600 Subject: [PATCH] refactor(entrypoint): move HTTP/S message to javascript --- build/entrypoint.sh | 3 --- build/livereload.js | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build/entrypoint.sh b/build/entrypoint.sh index 712e3e1..741b23b 100644 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -99,7 +99,6 @@ if [ "$doServer" -eq 1 ]; then # https pre-flight check if [ "$enableHTTPS" = "true" ]; then - printf "[SSL/TLS mode enabled]\n" certStatus="$(certificateCheckExist)" case "$certStatus" in noexist) @@ -120,8 +119,6 @@ if [ "$doServer" -eq 1 ]; then printf "[Certificate OK]\n" ;; esac - else - printf "[HTTP mode enabled]\n" fi exec node livereload.js exit "$?" diff --git a/build/livereload.js b/build/livereload.js index 57a155a..571c460 100644 --- a/build/livereload.js +++ b/build/livereload.js @@ -16,6 +16,7 @@ const options = { // set debugging output as per LR_DEBUG if (process.env.LR_DEBUG === "true") { options.debug = true + console.log("[Debug output ENABLED]"); } // set HTTPS as per LR_HTTPS @@ -24,6 +25,10 @@ if (process.env.LR_HTTPS === "true") { cert: fs.readFileSync('/certs/fullchain.pem'), key: fs.readFileSync('/certs/privkey.pem') }; + console.log("[HTTPS mode]"); +} +else { + console.log("[HTTP mode]"); } // start server