mirror of
				https://github.com/casjaysdevdocker/tor
				synced 2025-10-30 20:02:25 -04:00 
			
		
		
		
	🗃️ Update codebase 🗃️
rootfs/root/docker/setup/06-post.sh rootfs/usr/local/etc/docker/init.d/zz-nginx.sh rootfs/usr/local/etc/docker/init.d/03-tor-server.sh rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
This commit is contained in:
		| @@ -417,7 +417,7 @@ __post_execute() { | |||||||
| 				echo "$name: $url" | 				echo "$name: $url" | ||||||
| 				touch "/run/tor/sites/$site" | 				touch "/run/tor/sites/$site" | ||||||
| 				echo '<a href="http://'$url'">'$name'</a><br />' >>"$WWW_ROOT_DIR/hostnames.html" | 				echo '<a href="http://'$url'">'$name'</a><br />' >>"$WWW_ROOT_DIR/hostnames.html" | ||||||
| 				if [ "$name" = "default" ]; then echo "$site" >"$WWW_ROOT_DIR/default_host.txt"; fi | 				if [ "$name" = "default" ]; then echo "$site" >"$WWW_ROOT_DIR/defaultOnion.txt"; fi | ||||||
| 			done | 			done | ||||||
| 			echo "End current hidden services" | 			echo "End current hidden services" | ||||||
| 		fi | 		fi | ||||||
|   | |||||||
| @@ -266,9 +266,9 @@ __update_conf_files() { | |||||||
|  |  | ||||||
| 	# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 	# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
| 	# custom commands | 	# custom commands | ||||||
| 	if [ -f "$WWW_ROOT_DIR/default_host.txt" ]; then | 	if [ -f "$WWW_ROOT_DIR/defaultOnion.txt" ]; then | ||||||
| 		default_host="${default_host:-$(<"$WWW_ROOT_DIR/default_host.txt")}" | 		default_host="${default_host:-$(<"$WWW_ROOT_DIR/defaultOnion.txt")}" | ||||||
| 		rm -Rf "$WWW_ROOT_DIR/default_host.txt" | 		rm -Rf "$WWW_ROOT_DIR/defaultOnion.txt" | ||||||
| 	fi | 	fi | ||||||
| 	# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 	# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
| 	# replace variables | 	# replace variables | ||||||
| @@ -292,17 +292,17 @@ __update_conf_files() { | |||||||
| 			onion_site="$(basename -- $site)" | 			onion_site="$(basename -- $site)" | ||||||
| 			__onion_site_dir_is_empty "$onion_site" && NEW_SITE="yes" || NEW_SITE="no" | 			__onion_site_dir_is_empty "$onion_site" && NEW_SITE="yes" || NEW_SITE="no" | ||||||
| 			[ -d "/data/htdocs/onions/$onion_site" ] || mkdir -p "/data/htdocs/onions/$onion_site" | 			[ -d "/data/htdocs/onions/$onion_site" ] || mkdir -p "/data/htdocs/onions/$onion_site" | ||||||
| 			if [ "$default_host" = "$onion_site" ] && __onion_site_dir_is_empty "$onion_site"; then | 			if [ "$default_host" = "$onion_site" ]; then | ||||||
|  | 				if [ "$NEW_SITE" != "no" ]; then | ||||||
| 					cp -Rfa "$WWW_ROOT_DIR/." "/data/htdocs/onions/$onion_site/" | 					cp -Rfa "$WWW_ROOT_DIR/." "/data/htdocs/onions/$onion_site/" | ||||||
| 			else | 				fi | ||||||
| 				if [ "$NEW_SITE" = "yes" ]; then | 			elif [ "$NEW_SITE" = "yes" ]; then | ||||||
| 				if [ -f "/usr/share/httpd/default/hidden_services.html" ]; then | 				if [ -f "/usr/share/httpd/default/hidden_services.html" ]; then | ||||||
| 					cp -Rf "/usr/share/httpd/default/hidden_services.html" "/data/htdocs/onions/$onion_site/index.html" | 					cp -Rf "/usr/share/httpd/default/hidden_services.html" "/data/htdocs/onions/$onion_site/index.html" | ||||||
| 				else | 				else | ||||||
| 					echo '<html><body><br /><center>HTML Document Root: /data/htdocs/onions/'$onion_site'</center><br /></body></html>' >"/data/htdocs/onions/$onion_site/index.html" | 					echo '<html><body><br /><center>HTML Document Root: /data/htdocs/onions/'$onion_site'</center><br /></body></html>' >"/data/htdocs/onions/$onion_site/index.html" | ||||||
| 				fi | 				fi | ||||||
| 			fi | 			fi | ||||||
| 			fi |  | ||||||
| 			if [ ! -f "/config/nginx/vhosts.d/$onion_site.onion.conf" ]; then | 			if [ ! -f "/config/nginx/vhosts.d/$onion_site.onion.conf" ]; then | ||||||
| 				cp -Rf "/config/nginx/vhosts.d/template" "/config/nginx/vhosts.d/$onion_site.onion.conf" | 				cp -Rf "/config/nginx/vhosts.d/template" "/config/nginx/vhosts.d/$onion_site.onion.conf" | ||||||
| 			fi | 			fi | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user