diff --git a/rootfs/usr/local/etc/docker/init.d/03-tor-server.sh b/rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
index 36043d2..b30d2e2 100755
--- a/rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
+++ b/rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
@@ -417,7 +417,7 @@ __post_execute() {
echo "$name: $url"
touch "/run/tor/sites/$site"
echo ''$name'
' >>"$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
echo "End current hidden services"
fi
diff --git a/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh b/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
index 5be2be0..0b70a62 100755
--- a/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
+++ b/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
@@ -266,9 +266,9 @@ __update_conf_files() {
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# custom commands
- if [ -f "$WWW_ROOT_DIR/default_host.txt" ]; then
- default_host="${default_host:-$(<"$WWW_ROOT_DIR/default_host.txt")}"
- rm -Rf "$WWW_ROOT_DIR/default_host.txt"
+ if [ -f "$WWW_ROOT_DIR/defaultOnion.txt" ]; then
+ default_host="${default_host:-$(<"$WWW_ROOT_DIR/defaultOnion.txt")}"
+ rm -Rf "$WWW_ROOT_DIR/defaultOnion.txt"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# replace variables
@@ -292,15 +292,15 @@ __update_conf_files() {
onion_site="$(basename -- $site)"
__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"
- if [ "$default_host" = "$onion_site" ] && __onion_site_dir_is_empty "$onion_site"; then
- cp -Rfa "$WWW_ROOT_DIR/." "/data/htdocs/onions/$onion_site/"
- else
- if [ "$NEW_SITE" = "yes" ]; 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"
- else
- echo '