🗃️ Committing everything that changed 🗃️
All checks were successful
release-tag / release-image (push) Successful in 5m7s

rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.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:
casjay
2025-06-11 14:33:34 -04:00
parent 83d674a6b0
commit 9c1b8fe09e
6 changed files with 21 additions and 21 deletions

View File

@@ -20,8 +20,11 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# shellcheck disable=SC1003,SC2016,SC2031,SC2120,SC2155,SC2199,SC2317
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Exit if service is disabled
[ -z "$TOR_BRIDGE_ENABLED" ] || [ "$TOR_BRIDGE_ENABLED" = "no" ] || [ "$TOR_BRIDGE_ENABLED" != "false" ] || exit 0
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# run trap command on exit
trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE";exit $retVal' SIGINT SIGTERM EXIT
trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE";exit $retVal' SIGINT SIGTERM ERR
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# setup debugging - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
[ -f "/config/.debug" ] && [ -z "$DEBUGGER_OPTIONS" ] && export DEBUGGER_OPTIONS="$(<"/config/.debug")" || DEBUGGER_OPTIONS="${DEBUGGER_OPTIONS:-}"
@@ -237,9 +240,8 @@ __update_conf_files() {
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# define actions
if [ "$TOR_BRIDGE_ENABLED" = "yes" ]; then
mkdir -p "$CONF_DIR/conf.d"
cat <<EOF >>"$CONF_DIR/bridge.conf"
mkdir -p "$CONF_DIR/conf.d"
cat <<EOF >>"$CONF_DIR/bridge.conf"
##### Bridge
RunAsDaemon 0
HardwareAccel 1
@@ -281,10 +283,7 @@ AccountingStart month 1 00:00
%include $CONF_DIR/conf.d/*.conf
EOF
[ -f "$CONF_DIR/conf.d/default.conf" ] || touch "$CONF_DIR/conf.d/default.conf"
else
unset EXEC_CMD_BIN EXEC_CMD_ARGS
fi
[ -f "$CONF_DIR/conf.d/default.conf" ] || touch "$CONF_DIR/conf.d/default.conf"
if [ "$TOR_DEBUG" = "yes" ]; then
sed -i 's|#Log debug|Log debug|g' "$CONF_DIR/bridge.conf"
fi