HTTPS: Skip default certificate creation if TLS is disabled #3819 #3823

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2023-10-14 18:55:09 +02:00
parent c5dc0af24c
commit afd77a6a30

View File

@ -11,10 +11,13 @@ if [[ $(id -u) != "0" ]]; then
exit 1
fi
# Abort if PHOTOPRISM_DEFAULT_TLS is "false".
# Abort if PHOTOPRISM_DEFAULT_TLS is "false" or PHOTOPRISM_DISABLE_TLS is "true".
if [[ ${PHOTOPRISM_DEFAULT_TLS} = "false" ]]; then
echo "Creation of a default HTTPS/TLS certificate is skipped because PHOTOPRISM_DEFAULT_TLS is \"false\"."
exit 0
elif [[ ${PHOTOPRISM_DISABLE_TLS} = "true" ]]; then
echo "Creation of a default HTTPS/TLS certificate is skipped because PHOTOPRISM_DISABLE_TLS is \"true\"."
exit 0
fi
# shellcheck disable=SC2164