mirror of
https://github.com/casjaysdevdocker/tor
synced 2025-10-30 14:02:32 -04:00
🗃️ Update codebase 🗃️
rootfs/root/docker/setup/06-post.sh rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
This commit is contained in:
@@ -275,14 +275,7 @@ __update_conf_files() {
|
||||
# __replace "" "" "$CONF_DIR/nginx.conf"
|
||||
# replace variables recursively
|
||||
# __find_replace "" "" "$CONF_DIR"
|
||||
if [ -f "$WWW_ROOT_DIR/index.html" ]; then
|
||||
sed -i 's|REPLACE_ONION_WWW_DIR|'$WWW_ROOT_DIR'|g' "/data/htdocs/www/index.html"
|
||||
[ -n "$default_host" ] && sed -i 's|REPLACE_DEFAULT_TOR_ADDRESS|'$default_host.onion'|g' "$WWW_ROOT_DIR/index.html" || sed -i '/REPLACE_DEFAULT_TOR_ADDRESS/d' "$WWW_ROOT_DIR/index.html"
|
||||
fi
|
||||
if [ -f "/data/htdocs/www/index.html" ]; then
|
||||
sed -i 's|REPLACE_ONION_WWW_DIR|/data/htdocs/www|g' "/data/htdocs/www/index.html"
|
||||
[ -n "$default_host" ] && sed -i 's|REPLACE_DEFAULT_TOR_ADDRESS|'$default_host.onion'|g' "/data/htdocs/www/index.html" || sed -i '/REPLACE_DEFAULT_TOR_ADDRESS/d' "/data/htdocs/www/index.html"
|
||||
fi
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# define actions
|
||||
while :; do
|
||||
@@ -326,6 +319,14 @@ __update_conf_files() {
|
||||
echo "Created $onion_site.onion in /data/htdocs/onions/$onion_site"
|
||||
done
|
||||
fi
|
||||
if [ -f "$WWW_ROOT_DIR/index.html" ]; then
|
||||
sed -i 's|REPLACE_ONION_WWW_DIR|'$WWW_ROOT_DIR'|g' "/data/htdocs/www/index.html"
|
||||
[ -n "$default_host" ] && sed -i 's|REPLACE_DEFAULT_TOR_ADDRESS|'$default_host.onion'|g' "$WWW_ROOT_DIR/index.html" || sed -i '/REPLACE_DEFAULT_TOR_ADDRESS/d' "$WWW_ROOT_DIR/index.html"
|
||||
fi
|
||||
if [ -f "/data/htdocs/www/index.html" ]; then
|
||||
sed -i 's|REPLACE_ONION_WWW_DIR|/data/htdocs/www|g' "/data/htdocs/www/index.html"
|
||||
[ -n "$default_host" ] && sed -i 's|REPLACE_DEFAULT_TOR_ADDRESS|'$default_host.onion'|g' "/data/htdocs/www/index.html" || sed -i '/REPLACE_DEFAULT_TOR_ADDRESS/d' "/data/htdocs/www/index.html"
|
||||
fi
|
||||
# allow custom functions
|
||||
if builtin type -t __update_conf_files_local | grep -q 'function'; then __update_conf_files_local; fi
|
||||
# exit function
|
||||
|
||||
Reference in New Issue
Block a user