🔧 Update docker functions/entrypoint.sh to latest 🔧

Synced from casjay-dotfiles templates. Updated functions now check
for existence before copying template-files directories, skipping
gracefully when they are absent.
- rootfs/usr/local/etc/docker/functions/entrypoint.sh: updated to latest

rootfs/usr/local/etc/docker/functions/entrypoint.sh
This commit is contained in:
2026-06-04 11:52:20 -04:00
parent ebbe149916
commit 29c51880ca
@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck shell=bash # shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202605241245-git ##@Version : 202606041110-git
# @@Author : Jason Hempstead # @@Author : Jason Hempstead
# @@Contact : git-admin@casjaysdev.pro # @@Contact : git-admin@casjaysdev.pro
# @@License : LICENSE.md # @@License : LICENSE.md
@@ -1303,11 +1303,8 @@ __initialize_default_templates() {
local errors=0 local errors=0
if [ -n "$DEFAULT_TEMPLATE_DIR" ]; then if [ -n "$DEFAULT_TEMPLATE_DIR" ]; then
if [ "$CONFIG_DIR_INITIALIZED" = "no" ] && [ -d "/config" ]; then if [ "$CONFIG_DIR_INITIALIZED" = "no" ] && [ -d "/config" ]; then
[ -d "$DEFAULT_TEMPLATE_DIR" ] || return 0
__log_info "Copying default config files $DEFAULT_TEMPLATE_DIR > /config" __log_info "Copying default config files $DEFAULT_TEMPLATE_DIR > /config"
if [ ! -d "$DEFAULT_TEMPLATE_DIR" ]; then
__log_warn "Template directory not found: $DEFAULT_TEMPLATE_DIR"
return 0
fi
for create_config_template in "$DEFAULT_TEMPLATE_DIR"/*; do for create_config_template in "$DEFAULT_TEMPLATE_DIR"/*; do
if [ -e "$create_config_template" ]; then if [ -e "$create_config_template" ]; then
create_template_name="${create_config_template##*/}" create_template_name="${create_config_template##*/}"
@@ -1340,11 +1337,8 @@ __initialize_config_dir() {
local errors=0 local errors=0
if [ -n "$DEFAULT_CONF_DIR" ]; then if [ -n "$DEFAULT_CONF_DIR" ]; then
if [ "$CONFIG_DIR_INITIALIZED" = "no" ] && [ -d "/config" ]; then if [ "$CONFIG_DIR_INITIALIZED" = "no" ] && [ -d "/config" ]; then
[ -d "$DEFAULT_CONF_DIR" ] || return 0
__log_info "Copying custom config files: $DEFAULT_CONF_DIR > /config" __log_info "Copying custom config files: $DEFAULT_CONF_DIR > /config"
if [ ! -d "$DEFAULT_CONF_DIR" ]; then
__log_warn "Config directory not found: $DEFAULT_CONF_DIR"
return 0
fi
for create_config_template in "$DEFAULT_CONF_DIR"/*; do for create_config_template in "$DEFAULT_CONF_DIR"/*; do
if [ -e "$create_config_template" ]; then if [ -e "$create_config_template" ]; then
create_config_name="${create_config_template##*/}" create_config_name="${create_config_template##*/}"
@@ -1377,6 +1371,7 @@ __initialize_data_dir() {
[ "$DATA_DIR_INITIALIZED" = "no" ] || return 0 [ "$DATA_DIR_INITIALIZED" = "no" ] || return 0
if [ -d "/data" ]; then if [ -d "/data" ]; then
if [ -n "$DEFAULT_DATA_DIR" ]; then if [ -n "$DEFAULT_DATA_DIR" ]; then
[ -d "$DEFAULT_DATA_DIR" ] || return 0
__log_info "Copying data files $DEFAULT_DATA_DIR > /data" __log_info "Copying data files $DEFAULT_DATA_DIR > /data"
for create_data_template in "$DEFAULT_DATA_DIR"/*; do for create_data_template in "$DEFAULT_DATA_DIR"/*; do
create_data_name="${create_data_template##*/}" create_data_name="${create_data_template##*/}"