first commit

This commit is contained in:
2024-08-12 14:51:56 +02:00
commit 343ef5c699
66 changed files with 5773 additions and 0 deletions

25
rootfs/post-init.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
# shellcheck disable=SC1091
set -o errexit
set -o nounset
set -o pipefail
# set -o xtrace # Uncomment this line for debugging purposes
# Only execute init scripts once
if [[ ! -f "/bitnami/dokuwiki/.user_scripts_initialized" && -d "/docker-entrypoint-init.d" ]]; then
read -r -a init_scripts <<< "$(find "/docker-entrypoint-init.d" -type f -print0 | sort -z | xargs -0)"
if [[ "${#init_scripts[@]}" -gt 0 ]] && [[ ! -f "/bitnami/dokuwiki/.user_scripts_initialized" ]]; then
mkdir -p "/bitnami/dokuwiki"
for init_script in "${init_scripts[@]}"; do
for init_script_type_handler in /post-init.d/*.sh; do
"$init_script_type_handler" "$init_script"
done
done
fi
touch "/bitnami/dokuwiki/.user_scripts_initialized"
fi