mirror of
https://github.com/casjaysdevdocker/tor
synced 2026-07-14 23:45:55 -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/zz-nginx.sh: write .local.sh via heredoc in __create_service_env; bump version to 202606261600-git rootfs/usr/local/etc/docker/init.d/03-tor-relay.sh rootfs/usr/local/etc/docker/init.d/98-privoxy.sh rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
##@Version : 202605241142-git
|
##@Version : 202606261600-git
|
||||||
# @@Author : Jason Hempstead
|
# @@Author : Jason Hempstead
|
||||||
# @@Contact : jason@casjaysdev.pro
|
# @@Contact : jason@casjaysdev.pro
|
||||||
# @@License : WTFPL
|
# @@License : WTFPL
|
||||||
@@ -520,23 +520,28 @@ __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"
|
||||||
__run_precopy_local() { true; }
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# Local overrides - sourced after the main env file.
|
||||||
__execute_prerun_local() { true; }
|
# Redefine any of these functions to customise behaviour.
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__run_pre_execute_checks_local() { true; }
|
__run_precopy_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__update_conf_files_local() { true; }
|
__execute_prerun_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__pre_execute_local() { true; }
|
__run_pre_execute_checks_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__post_execute_local() { true; }
|
__update_conf_files_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__pre_message_local() { true; }
|
__pre_execute_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__update_ssl_conf_local() { true; }
|
__post_execute_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
__pre_message_local() { true; }
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
__update_ssl_conf_local() { true; }
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
if ! __file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh"; then
|
if ! __file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh"; then
|
||||||
exitCode=$((exitCode + 1))
|
exitCode=$((exitCode + 1))
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
##@Version : 202605241142-git
|
##@Version : 202606261600-git
|
||||||
# @@Author : Jason Hempstead
|
# @@Author : Jason Hempstead
|
||||||
# @@Contact : jason@casjaysdev.pro
|
# @@Contact : jason@casjaysdev.pro
|
||||||
# @@License : WTFPL
|
# @@License : WTFPL
|
||||||
@@ -452,23 +452,28 @@ __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"
|
||||||
__run_precopy_local() { true; }
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# Local overrides - sourced after the main env file.
|
||||||
__execute_prerun_local() { true; }
|
# Redefine any of these functions to customise behaviour.
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__run_pre_execute_checks_local() { true; }
|
__run_precopy_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__update_conf_files_local() { true; }
|
__execute_prerun_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__pre_execute_local() { true; }
|
__run_pre_execute_checks_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__post_execute_local() { true; }
|
__update_conf_files_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__pre_message_local() { true; }
|
__pre_execute_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__update_ssl_conf_local() { true; }
|
__post_execute_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
__pre_message_local() { true; }
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
__update_ssl_conf_local() { true; }
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
if ! __file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh"; then
|
if ! __file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh"; then
|
||||||
exitCode=$((exitCode + 1))
|
exitCode=$((exitCode + 1))
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
##@Version : 202605241142-git
|
##@Version : 202606261600-git
|
||||||
# @@Author : Jason Hempstead
|
# @@Author : Jason Hempstead
|
||||||
# @@Contact : jason@casjaysdev.pro
|
# @@Contact : jason@casjaysdev.pro
|
||||||
# @@License : WTFPL
|
# @@License : WTFPL
|
||||||
@@ -511,23 +511,28 @@ __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"
|
||||||
__run_precopy_local() { true; }
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# Local overrides - sourced after the main env file.
|
||||||
__execute_prerun_local() { true; }
|
# Redefine any of these functions to customise behaviour.
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__run_pre_execute_checks_local() { true; }
|
__run_precopy_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__update_conf_files_local() { true; }
|
__execute_prerun_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__pre_execute_local() { true; }
|
__run_pre_execute_checks_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__post_execute_local() { true; }
|
__update_conf_files_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__pre_message_local() { true; }
|
__pre_execute_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__update_ssl_conf_local() { true; }
|
__post_execute_local() { true; }
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
__pre_message_local() { true; }
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
__update_ssl_conf_local() { true; }
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
if ! __file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh"; then
|
if ! __file_exists_with_content "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh"; then
|
||||||
exitCode=$((exitCode + 1))
|
exitCode=$((exitCode + 1))
|
||||||
|
|||||||
Reference in New Issue
Block a user