🗃️ Update codebase 🗃️
All checks were successful
release-tag / release-image (push) Successful in 6m57s

rootfs/root/docker/setup/03-files.sh
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
This commit is contained in:
casjay
2025-11-21 06:36:58 -05:00
parent 939b16c57d
commit b65539178c
4 changed files with 58 additions and 42 deletions

View File

@@ -82,7 +82,12 @@ fi
unset data unset data
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Main script # Main script
for tor_bin in relay bridge server; do
if [ ! -f "/usr/local/bin/tor-$tor_bin" ]; then
cp -Rf "$(type -P tor 2>/dev/null)" "/usr/local/bin/tor-$tor_bin"
chmod +x "/usr/local/bin/tor-$tor_bin"
fi
done
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Set the exit code # Set the exit code
#exitCode=$? #exitCode=$?

View File

@@ -200,9 +200,12 @@ RANDOM_NICK="$(head -n50 '/dev/random' | tr -dc 'a-zA-Z' | tr -d '[:space:]\042\
__run_precopy() { __run_precopy() {
# Define environment # Define environment
local hostname=${HOSTNAME} local hostname=${HOSTNAME}
local tor_bin="$(type -P "tor" 2>/dev/null)"
local server_bin="$(type -P "tor-bridge" 2>/dev/null)"
# Define actions/commands # Define actions/commands
[ -d "$DATA_DIR" ] || mkdir -p "$DATA_DIR" [ -d "$DATA_DIR" ] || mkdir -p "$DATA_DIR"
[ -n "$tor_bin" ] && [ -z "$server_bin" ] && cp -Rf "$tor_bin" "/usr/local/bin/tor-bridge"
chmod +x "/usr/local/bin/tor-bridge"
# allow custom functions # allow custom functions
if builtin type -t __run_precopy_local | grep -q 'function'; then __run_precopy_local; fi if builtin type -t __run_precopy_local | grep -q 'function'; then __run_precopy_local; fi
} }

View File

@@ -200,8 +200,12 @@ RANDOM_NICK="$(head -n50 '/dev/random' | tr -dc 'a-zA-Z' | tr -d '[:space:]\042\
__run_precopy() { __run_precopy() {
# Define environment # Define environment
local hostname=${HOSTNAME} local hostname=${HOSTNAME}
local tor_bin="$(type -P "tor" 2>/dev/null)"
local server_bin="$(type -P "tor-relay" 2>/dev/null)"
# Define actions/commands # Define actions/commands
[ -d "$DATA_DIR" ] || mkdir -p "$DATA_DIR" [ -d "$DATA_DIR" ] || mkdir -p "$DATA_DIR"
[ -n "$tor_bin" ] && [ -z "$server_bin" ] && cp -Rf "$tor_bin" "/usr/local/bin/tor-relay"
chmod +x "/usr/local/bin/tor-relay"
# allow custom functions # allow custom functions
if builtin type -t __run_precopy_local | grep -q 'function'; then __run_precopy_local; fi if builtin type -t __run_precopy_local | grep -q 'function'; then __run_precopy_local; fi

View File

@@ -200,8 +200,12 @@ RANDOM_NICK="$(head -n50 '/dev/random' | tr -dc 'a-zA-Z' | tr -d '[:space:]\042\
__run_precopy() { __run_precopy() {
# Define environment # Define environment
local hostname=${HOSTNAME} local hostname=${HOSTNAME}
local tor_bin="$(type -P "tor" 2>/dev/null)"
local server_bin="$(type -P "tor-server" 2>/dev/null)"
# Define actions/commands # Define actions/commands
[ -d "$DATA_DIR" ] || mkdir -p "$DATA_DIR" [ -d "$DATA_DIR" ] || mkdir -p "$DATA_DIR"
[ -n "$tor_bin" ] && [ -z "$server_bin" ] && cp -Rf "$tor_bin" "/usr/local/bin/tor-server"
chmod +x "/usr/local/bin/tor-server"
# allow custom functions # allow custom functions
if builtin type -t __run_precopy_local | grep -q 'function'; then __run_precopy_local; fi if builtin type -t __run_precopy_local | grep -q 'function'; then __run_precopy_local; fi