refactor(entrypoint): move HTTP/S message to javascript
This commit is contained in:
parent
e83dce3304
commit
81cfe975b4
@ -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 "$?"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user