mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-22 15:36:52 +00:00
Let the Nextcloud-Container trust custom CAs (e.g. for using LDAPS) 2
Signed-off-by: Lorenzo Marroccoli <lollo0296@gmail.com> Signed-off-by: szaimen <szaimen@e.mail.de> Co-Authored-By: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
bfcbc41141
commit
935d4aab11
10 changed files with 48 additions and 1 deletions
|
|
@ -161,6 +161,14 @@ It is set to '$DOCKER_SOCKET_PATH'."
|
|||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [ -n "$TRUSTED_CACERTS_DIR" ]; then
|
||||
if ! echo "$TRUSTED_CACERTS_DIR" | grep -q "^/" || echo "$TRUSTED_CACERTS_DIR" | grep -q "/$"; then
|
||||
echo "You've set TRUSTED_CACERTS_DIR but not to an allowed value.
|
||||
It should be an absolute path to a directory that starts with '/' but not end with '/'.
|
||||
It is set to '$TRUSTED_CACERTS_DIR '."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check DNS resolution
|
||||
# Prevents issues like https://github.com/nextcloud/all-in-one/discussions/565
|
||||
|
|
|
|||
|
|
@ -22,6 +22,12 @@ if [ -f "/var/www/html/config/config.php" ]; then
|
|||
# sed -i "s|'dbpassword'.*=>.*$|'dbpassword' => '$POSTGRES_PASSWORD',|" /var/www/html/config/config.php
|
||||
fi
|
||||
|
||||
# Trust additional Cacerts, if the user provided $TRUSTED_CACERTS_DIR
|
||||
if [ -n "$TRUSTED_CACERTS_DIR" ]; then
|
||||
echo "User required to trust additional CA certificates, running 'update-ca-certificates."
|
||||
update-ca-certificates
|
||||
fi
|
||||
|
||||
# Run original entrypoint
|
||||
if ! bash /entrypoint.sh; then
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue