mirror of
https://github.com/casjaysdevdocker/tor
synced 2025-06-27 15:48:57 -04:00
🗃️ Committing everything that changed 🗃️
All checks were successful
release-tag / release-image (push) Successful in 5m44s
All checks were successful
release-tag / release-image (push) Successful in 5m44s
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:
parent
83dde3d6b9
commit
9bd2e1f830
@ -383,6 +383,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
|
||||||
done
|
done
|
||||||
echo "End current hidden services"
|
echo "End current hidden services"
|
||||||
fi
|
fi
|
||||||
|
@ -236,6 +236,7 @@ __run_pre_execute_checks() {
|
|||||||
__update_conf_files() {
|
__update_conf_files() {
|
||||||
local exitCode=0 # default exit code
|
local exitCode=0 # default exit code
|
||||||
local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname
|
local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname
|
||||||
|
[ -f "$WWW_ROOT_DIR/default_host.txt" ] && default_host="$(<"$WWW_ROOT_DIR/default_host.txt")" && rm -Rf "$WWW_ROOT_DIR/default_host.txt"
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# delete files
|
# delete files
|
||||||
#__rm ""
|
#__rm ""
|
||||||
@ -248,13 +249,16 @@ __update_conf_files() {
|
|||||||
# __replace "" "" "$CONF_DIR/nginx.conf"
|
# __replace "" "" "$CONF_DIR/nginx.conf"
|
||||||
# replace variables recursively
|
# replace variables recursively
|
||||||
# __find_replace "" "" "$CONF_DIR"
|
# __find_replace "" "" "$CONF_DIR"
|
||||||
|
if [ -n "$default_host" ] && [ -f "$WWW_ROOT_DIR/index.html" ]; then
|
||||||
|
sed -i 's|imtulbcjer7mohs62lpycyod2c3pnil2x6xjirrojedbluh4d7z2g6ad|'$default_host'|g' "$WWW_ROOT_DIR/index.html"
|
||||||
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# define actions
|
# define actions
|
||||||
echo "waiting for tor to start"
|
|
||||||
while :; do
|
while :; do
|
||||||
|
printf '\r%s' "waiting for tor to start"
|
||||||
[ -f "/tmp/init_tor_services" ] && sleep 30 || break
|
[ -f "/tmp/init_tor_services" ] && sleep 30 || break
|
||||||
done
|
done
|
||||||
|
printf '\r%s\n' "The tor server seems to have started "
|
||||||
for site in "/run/tor/sites"/*; do
|
for site in "/run/tor/sites"/*; do
|
||||||
onion_site="$(basename -- $site)"
|
onion_site="$(basename -- $site)"
|
||||||
mkdir -p "/data/htdocs/onions/$onion_site"
|
mkdir -p "/data/htdocs/onions/$onion_site"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user