jason
c96a4c7996
♻️ Migrate tor to /config/ source-of-truth architecture ♻️
...
Migrate tor Docker image to the new build-time config architecture.
- rootfs/root/docker/setup/03-files.sh: rewrite to canonical form with /tmp/bin, /tmp/var, /tmp/etc, /tmp/usr handlers; remove template-files copy block
- rootfs/usr/local/etc/docker/functions/entrypoint.sh: update to latest template with __init_service_conf, __find_php_ini, __find_php_bin helpers
- rootfs/usr/local/etc/docker/init.d/*.sh: fix $(basename) UUOC → ${var##*/}; move inline comments above code lines; remove commented-out dead code
- rootfs/usr/local/share/template-files/: delete entire directory; config files now deployed via /tmp/etc/ at build time
rootfs/root/docker/setup/03-files.sh
rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/01-tor-server.sh
rootfs/usr/local/etc/docker/init.d/04-tor-exit.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
rootfs/usr/local/share/template-files/config/env/default.sample
rootfs/usr/local/share/template-files/config/env/examples/00-directory.sh
rootfs/usr/local/share/template-files/config/env/examples/addresses.sh
rootfs/usr/local/share/template-files/config/env/examples/certbot.sh
rootfs/usr/local/share/template-files/config/env/examples/couchdb.sh
rootfs/usr/local/share/template-files/config/env/examples/dockerd.sh
rootfs/usr/local/share/template-files/config/env/examples/global.sh
rootfs/usr/local/share/template-files/config/env/examples/healthcheck.sh
rootfs/usr/local/share/template-files/config/env/examples/mariadb.sh
rootfs/usr/local/share/template-files/config/env/examples/mongodb.sh
rootfs/usr/local/share/template-files/config/env/examples/networking.sh
rootfs/usr/local/share/template-files/config/env/examples/other.sh
rootfs/usr/local/share/template-files/config/env/examples/php.sh
rootfs/usr/local/share/template-files/config/env/examples/postgres.sh
rootfs/usr/local/share/template-files/config/env/examples/redis.sh
rootfs/usr/local/share/template-files/config/env/examples/services.sh
rootfs/usr/local/share/template-files/config/env/examples/ssl.sh
rootfs/usr/local/share/template-files/config/env/examples/supabase.sh
rootfs/usr/local/share/template-files/config/env/examples/webservers.sh
rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh
rootfs/usr/local/share/template-files/config/.gitkeep
rootfs/usr/local/share/template-files/data/.gitkeep
rootfs/usr/local/share/template-files/defaults/.gitkeep
2026-06-04 14:49:19 -04:00
jason
f4df3572d5
🐛 Fix printf %q empty-var bug; sync Dockerfile; update README 🐛
...
Three fixes in this commit:
1. printf '%q' empty-variable bug — all 7 init.d service scripts:
printf '%q ' $su_exec/\$args/\$extra_env with an unset/empty variable
calls printf with no vararg, causing bash to format the empty string
as '' (two single-quotes), which gets written into the generated exec
script and makes the container fail to start. Fixed with ${var:+...}
parameter expansion so an empty variable produces an empty string.
2. Dockerfile — sync to template 202605261603 (structural changes:
blank line after $SHELL_OPTS in apk-repos block, un-indented echo ""
in Custom Settings and Custom Applications stubs); preserve all
tor-specific values (IMAGE_NAME, PHP_SERVER, BUILD_DATE, SERVICE_PORT,
EXPOSE_PORTS, PHP_VERSION, IMAGE_REPO, CONTAINER_VERSION, PULL_URL,
PACK_LIST, HOSTNAME, OCI labels).
3. README.md — add the full EXPOSE_PORTS list to the docker run command
and docker-compose ports section (privoxy 8118, SOCKS5 9050, DNS 9053
TCP+UDP, web 9080, bridge range 57000-57007).
- Dockerfile: sync structural template changes; update BUILD_DATE to 202605261603
- README.md: add -p 8118:8118 9050:9050 9053:9053 9053/udp 9080:9080 57000-57007 ports
- rootfs/usr/local/etc/docker/init.d/01-tor-server.sh: fix _q_su/_q_args/_q_extra printf %q guard
- rootfs/usr/local/etc/docker/init.d/02-tor-bridge.sh: fix _q_su/_q_args/_q_extra printf %q guard
- rootfs/usr/local/etc/docker/init.d/03-tor-relay.sh: fix _q_su/_q_args/_q_extra printf %q guard
- rootfs/usr/local/etc/docker/init.d/04-tor-exit.sh: fix _q_su/_q_args/_q_extra printf %q guard
- rootfs/usr/local/etc/docker/init.d/09-unbound.sh: fix _q_su/_q_args/_q_extra printf %q guard
- rootfs/usr/local/etc/docker/init.d/98-privoxy.sh: fix _q_su/_q_args/_q_extra printf %q guard
- rootfs/usr/local/etc/docker/init.d/zz-nginx.sh: fix _q_su/_q_args/_q_extra printf %q guard
Dockerfile
README.md
rootfs/usr/local/etc/docker/init.d/01-tor-server.sh
rootfs/usr/local/etc/docker/init.d/02-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/03-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/04-tor-exit.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2026-05-26 18:25:35 -04:00
jason
fd24da283f
♻️ Refactor all 7 init scripts to new template structure ♻️
...
Replace all boilerplate in the 7 service init scripts with the new
template structure from 00-template.sh while preserving all
service-specific content (function bodies, variables, heredoc configs).
Key boilerplate changes applied to all scripts:
- WTFPL license header, 2026 copyright, 49-char separators
- shellcheck disable list updated (SC2317, SC2329 added)
- set -e placed before trap lines
- New __trap_err_handler() with smart critical vs non-critical detection
- SIGPWR trap added as separate line with 2>/dev/null || true
- ${VAR##*/} replacing $(basename -- ...) for SCRIPT_NAME/EXEC_CMD_NAME
- if-block style throughout (replacing one-liner && / || guards)
- _resolved pattern for binary path resolution
- New __run_start_script with printf/hash-cache/bash "$START_SCRIPT"
- __run_secure_function with [ -n "$SERVICE_USER" ] && guard
- SERVICE_USES_PID='' variable added after EXEC_PRE_SCRIPT
- ${PIPESTATUS[0]} replacing $? after pipelines
- sleep 2 (not sleep 5) in __pre_execute
- fire-and-forget pattern in __post_execute (retVal=0)
- No __banner call at end; no SERVICE_PID_NUMBER= at bottom
- Remove duplicate "create needed dirs" block
- Remove IP4_ADDRESS/IP6_ADDRESS lines
- path: rootfs/usr/local/etc/docker/init.d/01-tor-server.sh: refactor to new template boilerplate; preserve tor-server service logic
- path: rootfs/usr/local/etc/docker/init.d/02-tor-bridge.sh: refactor to new template boilerplate; preserve tor-bridge service logic
- path: rootfs/usr/local/etc/docker/init.d/03-tor-relay.sh: refactor to new template boilerplate; preserve tor-relay service logic
- path: rootfs/usr/local/etc/docker/init.d/04-tor-exit.sh: refactor to new template boilerplate; preserve tor-exit service logic
- path: rootfs/usr/local/etc/docker/init.d/09-unbound.sh: refactor to new template boilerplate; preserve unbound service logic
- path: rootfs/usr/local/etc/docker/init.d/98-privoxy.sh: refactor to new template boilerplate; preserve privoxy service logic
- path: rootfs/usr/local/etc/docker/init.d/zz-nginx.sh: refactor to new template boilerplate; preserve nginx/onion service logic
README.md
rootfs/usr/local/etc/docker/init.d/01-tor-server.sh
rootfs/usr/local/etc/docker/init.d/02-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/03-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/04-tor-exit.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2026-05-26 17:35:40 -04:00
jason
fddaa7d0ee
🗃️ rootfs: shield internal entrypoint PID files from /run/*.pid sweeps 🗃️
...
Update the embedded entrypoint copies in rootfs/ to match the
upstream template change. Internal state files renamed to dotfiles
so they're not matched by `/run/*.pid` cleanup globs:
- /run/init.d/entrypoint.pid -> /run/.entrypoint.pid
- /run/no_exit.pid -> /run/.no_exit.pid
- /run/backup.pid -> /run/.backup.pid
- /run/__start_init_scripts.pid -> /run/.start_init_scripts.pid
Per-service PIDs in /run/init.d/ are unchanged.
rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/01-tor-server.sh
rootfs/usr/local/etc/docker/init.d/02-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/03-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/04-tor-exit.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
rootfs/usr/local/share/template-files/config/env/default.sample
rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh
2026-05-05 19:13:19 -04:00
jason
b438368de6
🗃️ Update codebase 🗃️
...
rootfs/tmp/etc/nginx/vhosts.d/template
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-11-21 09:35:41 -05:00
jason
1eb0ca8b36
🗃️ 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
2025-10-22 15:06:50 -04:00
jason
1541f05cf5
🗃️ Update codebase 🗃️
...
rootfs/root/docker/setup/06-post.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-10-22 14:30:35 -04:00
jason
a8b3b67d87
🗃️ Update codebase 🗃️
...
rootfs/root/docker/setup/06-post.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-10-22 14:10:17 -04:00
jason
c791950cbe
🗃️ Update codebase 🗃️
...
rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
rootfs/usr/share/httpd/default/hidden_service.html
rootfs/usr/share/httpd/default/hidden_services.html
Dockerfile
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-10-22 12:13:32 -04:00
jason
91cbd47b4b
🗃️ Update codebase 🗃️
...
rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
rootfs/usr/share/httpd/default/hidden_service.html
rootfs/usr/share/httpd/default/hidden_services.html
2025-10-22 11:33:49 -04:00
jason
1d6dd1520e
🗃️ Update codebase 🗃️
...
rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-10-22 10:50:04 -04:00
jason
84f6c6e6d0
🗃️ Update codebase 🗃️
...
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-10-22 10:22:05 -04:00
jason
346f0e82dd
🗃️ Update codebase 🗃️
...
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-10-22 10:08:38 -04:00
jason
320cda38c0
🗃️ Update codebase 🗃️
...
rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-10-22 09:14:22 -04:00
jason
c29e60f5f3
🗃️ Update codebase 🗃️
...
rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-10-22 08:53:17 -04:00
jason
fb27515b61
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
rootfs/usr/share/httpd/default/index.html
2025-06-12 11:57:45 -04:00
jason
727a4c67d7
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-06-11 18:36:18 -04:00
jason
95d09c0cf5
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-06-11 17:58:01 -04:00
jason
111d6d79a0
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-06-11 17:49:25 -04:00
jason
fa1d037056
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-06-11 17:23:27 -04:00
jason
9bd2e1f830
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-06-11 17:14:00 -04:00
jason
1af1d46abf
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-06-11 15:44:48 -04:00
jason
9c1b8fe09e
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-06-11 14:33:34 -04:00
jason
83d674a6b0
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-05-01 15:00:14 -04:00
jason
a33523f179
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-05-01 14:29:09 -04:00
jason
130effde11
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-05-01 14:05:35 -04:00
jason
a704a3dc60
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-05-01 14:03:29 -04:00
jason
b863686c61
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-05-01 13:57:22 -04:00
jason
56187da6ba
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-05-01 13:48:43 -04:00
jason
ebace5b6fa
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-05-01 13:47:39 -04:00
jason
b8a2353b6a
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-05-01 13:36:02 -04:00
jason
8b13c439a2
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-05-01 13:29:21 -04:00
jason
a1bb44098a
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-05-01 12:17:50 -04:00
jason
b445cbc0d5
🗃️ Committing everything that changed 🗃️
...
rootfs/tmp/etc/nginx/nginx.conf
rootfs/tmp/etc/nginx/vhosts.d/
rootfs/tmp/etc/unbound/unbound.conf
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
rootfs/usr/share/httpd/default/hidden_service.html
2025-05-01 10:32:45 -04:00
jason
85c43a8bfa
🗃️ Committing everything that changed 🗃️
...
Dockerfile
.env.scripts
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/09-unbound.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-02-03 15:20:20 -05:00
jason
9e0b841ffe
🗃️ Committing everything that changed 🗃️
...
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-01-29 14:03:32 -05:00
jason
da3d5930a5
🗃️ Committing everything that changed 🗃️
...
Dockerfile
.env.scripts
rootfs/tmp/etc/nginx/
rootfs/usr/local/etc/docker/init.d/99-php.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
2025-01-29 13:43:57 -05:00