mirror of
https://github.com/casjaysdevdocker/opencloud
synced 2026-07-25 14:11:38 -04:00
🐛 Fix __create_service_env to write .local.sh to disk 🐛
The .local.sh block defined stub functions in memory but never wrote the file to disk, so __file_exists_with_content always failed and __create_service_env returned non-zero on every run. Fix: use a heredoc to write the stub functions into .local.sh. - rootfs/usr/local/etc/docker/init.d/06-nginx.sh: write .local.sh via heredoc in __create_service_env; bump version to 202606261600-git rootfs/usr/local/etc/docker/init.d/04-collabora.sh rootfs/usr/local/etc/docker/init.d/05-opencloud.sh rootfs/usr/local/etc/docker/init.d/06-nginx.sh
This commit is contained in:
@@ -413,6 +413,10 @@ __create_service_env() {
|
|||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
if [ ! -f "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.local.sh" ]; then
|
if [ ! -f "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.local.sh" ]; then
|
||||||
|
cat <<'EOF' >"/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.local.sh"
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Local overrides - sourced after the main env file.
|
||||||
|
# Redefine any of these functions to customise behaviour.
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__run_precopy_local() { true; }
|
__run_precopy_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
@@ -430,6 +434,7 @@ EOF
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__update_ssl_conf_local() { true; }
|
__update_ssl_conf_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
__file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" || true
|
__file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" || true
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
##@Version : 202511211056-git
|
##@Version : 202606261600-git
|
||||||
# @@Author : Jason Hempstead
|
# @@Author : Jason Hempstead
|
||||||
# @@Contact : jason@casjaysdev.pro
|
# @@Contact : jason@casjaysdev.pro
|
||||||
# @@License : WTFPL
|
# @@License : WTFPL
|
||||||
@@ -449,6 +449,10 @@ __create_service_env() {
|
|||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
if [ ! -f "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.local.sh" ]; then
|
if [ ! -f "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.local.sh" ]; then
|
||||||
|
cat <<'EOF' >"/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.local.sh"
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Local overrides - sourced after the main env file.
|
||||||
|
# Redefine any of these functions to customise behaviour.
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__run_precopy_local() { true; }
|
__run_precopy_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
@@ -466,6 +470,7 @@ EOF
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__update_ssl_conf_local() { true; }
|
__update_ssl_conf_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
__file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" || true
|
__file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" || true
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
##@Version : 202511211133-git
|
##@Version : 202606261600-git
|
||||||
# @@Author : Jason Hempstead
|
# @@Author : Jason Hempstead
|
||||||
# @@Contact : jason@casjaysdev.pro
|
# @@Contact : jason@casjaysdev.pro
|
||||||
# @@License : WTFPL
|
# @@License : WTFPL
|
||||||
@@ -509,6 +509,10 @@ __create_service_env() {
|
|||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
if [ ! -f "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.local.sh" ]; then
|
if [ ! -f "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.local.sh" ]; then
|
||||||
|
cat <<'EOF' >"/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.local.sh"
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Local overrides - sourced after the main env file.
|
||||||
|
# Redefine any of these functions to customise behaviour.
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__run_precopy_local() { true; }
|
__run_precopy_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
@@ -526,6 +530,7 @@ EOF
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__update_ssl_conf_local() { true; }
|
__update_ssl_conf_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
__file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" || true
|
__file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" || true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user