Commit Graph

13 Commits

Author SHA1 Message Date
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 72f266b5a4 🗃️ Update codebase 🗃️
rootfs/tmp/etc/privoxy/config
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
2025-11-21 15:35:43 -05: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 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 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 f1e31207c7 🗃️ Committing everything that changed 🗃️
rootfs/tmp/etc/privoxy/config
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
2025-01-16 13:13:16 -05:00
jason 2142a2990b 🗃️ Committing everything that changed 🗃️
rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/01-tor-server.sh
rootfs/usr/local/etc/docker/init.d/02-tor-relay.sh
rootfs/usr/local/etc/docker/init.d/03-tor-bridge.sh
rootfs/usr/local/etc/docker/init.d/03-tor-server.sh
rootfs/usr/local/etc/docker/init.d/98-php.sh
rootfs/usr/local/etc/docker/init.d/98-privoxy.sh
rootfs/usr/local/etc/docker/init.d/99-php.sh
rootfs/usr/local/etc/docker/init.d/99-privoxy.sh
2025-01-09 00:42:55 -05:00