mirror of
				https://github.com/casjaysdevdocker/tor
				synced 2025-10-31 02:02:32 -04:00 
			
		
		
		
	🗃️ Update codebase 🗃️
rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/etc/docker/functions/entrypoint.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 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:
		| @@ -677,17 +677,18 @@ __create_service_user() { | ||||
| 			echo "$create_user ALL=(ALL)   NOPASSWD: ALL" >"/etc/sudoers" | ||||
| 		fi | ||||
| 		exitStatus=0 | ||||
| 		export SERVICE_UID="$create_uid" | ||||
| 		export SERVICE_GID="$create_gid" | ||||
| 		export SERVICE_USER="$create_user" | ||||
| 		export SERVICE_GROUP="$create_group" | ||||
| 		SERVICE_UID="$create_uid" | ||||
| 		SERVICE_GID="$create_gid" | ||||
| 		SERVICE_USER="$create_user" | ||||
| 		SERVICE_GROUP="$create_group" | ||||
| 	else | ||||
| 		export USER_UID=0 | ||||
| 		export USER_GID=0 | ||||
| 		export SERVICE_USER=root | ||||
| 		export SERVICE_GROUP=root | ||||
| 		SERVICE_UID=0 | ||||
| 		SERVICE_GID=0 | ||||
| 		SERVICE_USER=root | ||||
| 		SERVICE_GROUP=root | ||||
| 		exitStatus=2 | ||||
| 	fi | ||||
| 	export SERVICE_UID SERVICE_GID SERVICE_USER SERVICE_GROUP | ||||
| 	return $exitStatus | ||||
| } | ||||
| # - - - - - - - - - - - - - - - - - - - - - - - - - | ||||
| @@ -744,6 +745,7 @@ __start_init_scripts() { | ||||
| 	local retstatus="0" | ||||
| 	local initStatus="0" | ||||
| 	local critical_failures="0" | ||||
| 	local pidFile="/run/__start_init_scripts.pid" | ||||
| 	local init_dir="${1:-/usr/local/etc/docker/init.d}" | ||||
| 	local init_count="$(ls -A "$init_dir"/* 2>/dev/null | grep -v '\.sample' | wc -l)" | ||||
| 	local exit_on_failure="${EXIT_ON_SERVICE_FAILURE:-true}" | ||||
| @@ -754,7 +756,7 @@ __start_init_scripts() { | ||||
| 		rm -f /run/*.pid /run/init.d/*.pid 2>/dev/null || true | ||||
| 	fi | ||||
|  | ||||
| 	touch /run/__start_init_scripts.pid | ||||
| 	touch "$pidFile" | ||||
|  | ||||
| 	if [ "$init_count" -eq 0 ] || [ ! -d "$init_dir" ]; then | ||||
| 		mkdir -p "/data/logs/init" | ||||
| @@ -772,6 +774,7 @@ __start_init_scripts() { | ||||
|  | ||||
| 			for init in "$init_dir"/*.sh; do | ||||
| 				if [ -x "$init" ]; then | ||||
| 					touch "$pidFile" | ||||
| 					name="$(basename "$init")" | ||||
| 					service="$(printf '%s' "$name" | sed 's/^[^-]*-//;s|.sh$||g')" | ||||
| 					__service_banner "🔧" "Executing service script:" "$(basename "$init")" | ||||
| @@ -798,14 +801,19 @@ __start_init_scripts() { | ||||
| 								fi | ||||
| 							else | ||||
| 								# Service uses PID tracking - verify actual running processes | ||||
| 								set +e # Temporarily disable exit on error | ||||
| 								retPID="" | ||||
|  | ||||
| 								# First, try to find actual running process with various name patterns | ||||
| 								for name_variant in "$service" "${service//-*/}" "${service//-/_}"; do | ||||
| 								for name_variant in "$service" "${service}84" "${service}d" "$(echo "$service" | sed 's/-//g')" "$(echo "$service" | tr -d '-')"; do | ||||
| 									if [ -z "$retPID" ]; then | ||||
| 										retPID=$(__get_pid "$name_variant" 2>/dev/null || echo "") | ||||
| 										[ -n "$retPID" ] && found_process="$name_variant" && break | ||||
| 									fi | ||||
| 								done | ||||
|  | ||||
| 								set -e # Re-enable exit on error | ||||
|  | ||||
| 								if [ -n "$retPID" ] && [ "$retPID" != "0" ]; then | ||||
| 									# Found actual running process | ||||
| 									initStatus="0" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user