feature: allow non-secure connections
- default to secure - parameterize via env var
This commit is contained in:
@@ -6,21 +6,36 @@
|
||||
|
||||
# functions
|
||||
certificateGenerateNew() {
|
||||
certificateCheckEnabled
|
||||
printf "\nGenerating new self-signed certificate:\n"
|
||||
printf "Exporting new certificate:\n"
|
||||
exit 0
|
||||
}
|
||||
|
||||
certificateShow() {
|
||||
certificateCheckEnabled
|
||||
printf "\nCurrently loaded certificate:\n"
|
||||
exit 0
|
||||
}
|
||||
|
||||
certificateExport() {
|
||||
certificateCheckEnabled
|
||||
printf "\nExporting currently loaded certificate:\n"
|
||||
exit 0
|
||||
}
|
||||
|
||||
certificateCheckEnabled() {
|
||||
httpsEnabled="$(convertCaseUpper "$LR_HTTPS")"
|
||||
if [ "$httpsEnabled" != "TRUE" ]; then
|
||||
printf "\nSSL/TLS not enabled. Please set LR_HTTPS=TRUE if you want to enable SSL/TLS.\n"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
convertCaseUpper() {
|
||||
printf "%s" "$1" | tr "[:lower:]" "[:upper:]"
|
||||
}
|
||||
|
||||
# default variable values
|
||||
doCertExport=0
|
||||
doCertNew=0
|
||||
|
||||
Reference in New Issue
Block a user