mirror of
https://github.com/casjaysdevdocker/tor
synced 2025-11-24 11:47:03 -05:00
🗃️ Update codebase 🗃️
All checks were successful
release-tag / release-image (push) Successful in 6m57s
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:
@@ -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=$?
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user