🗃️ 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:
casjay
2025-10-22 15:06:50 -04:00
parent 1541f05cf5
commit 1eb0ca8b36
2 changed files with 13 additions and 13 deletions

View File

@@ -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

View File

@@ -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,15 +292,15 @@ __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
cp -Rfa "$WWW_ROOT_DIR/." "/data/htdocs/onions/$onion_site/" if [ "$NEW_SITE" != "no" ]; then
else cp -Rfa "$WWW_ROOT_DIR/." "/data/htdocs/onions/$onion_site/"
if [ "$NEW_SITE" = "yes" ]; then fi
if [ -f "/usr/share/httpd/default/hidden_services.html" ]; then elif [ "$NEW_SITE" = "yes" ]; then
cp -Rf "/usr/share/httpd/default/hidden_services.html" "/data/htdocs/onions/$onion_site/index.html" if [ -f "/usr/share/httpd/default/hidden_services.html" ]; then
else cp -Rf "/usr/share/httpd/default/hidden_services.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" else
fi 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
if [ ! -f "/config/nginx/vhosts.d/$onion_site.onion.conf" ]; then if [ ! -f "/config/nginx/vhosts.d/$onion_site.onion.conf" ]; then