Commit Graph
83 Commits
Author SHA1 Message Date
Gmer4LfeandClaude Sonnet 4.6 0ae31b5fa6 feat: Tailscale resolution hardening, partnership offboard completion, Emby provisioning
common.sh:
- Add resolve_tailscale_ip() helper — tries `tailscale ip -4` first, falls back to
  parsing `tailscale status` output; handles hosts where MagicDNS short-name resolution
  is not active
- Add PARTNERSHIP_OWN_CONTAINERS alias in detect_hosts()
- Add aliasing for 4 Emby provisioning vars (PARTNERSHIP_PROVISION_EMBY_ADMIN,
  PARTNERSHIP_EMBY_ADMIN_USER, PARTNERSHIP_EMBY_ADMIN_PASS, PARTNERSHIP_EMBY_PORT)

Partnership/partnership_manager.sh:
- Replace 9 bare `tailscale ip -4` calls with resolve_tailscale_ip()
- Add read_remote_conf_var() and read_remote_conf_array() — SSH to mirror, source its
  own load_config.sh + detect_hosts(), return aliased variable; solves sparse-checkout
  problem where HOST1 cannot read master_host2.conf directly
- Add derive_short_name() — strips unraid- prefix, capitalises first char
- Add cleanup_partner_containers() — removes partner containers via FolderView3 folder
  if enabled, else falls back to FALLBACK_*_COVERS_*_TIER* arrays
- Add cleanup_owner_containers_on_mirror() — SSH to mirror, stops and removes containers
  matching *-${OWNER_SHORT} naming convention
- Add start_own_stack() and start_mirror_own_stack() — restart own containers locally
  or on mirror via SSH using PARTNERSHIP_OWN_CONTAINERS
- Add provision_emby_admin() — reads mirror credentials via read_remote_conf_var, checks
  for username collision, creates user + sets password + grants admin policy via Emby API
- Add revoke_emby_admin() — looks up mirror username on local Emby, deletes via REST API
- Wire offboard paths (both mirror-initiated and owner-initiated) to call container
  cleanup and stack restart; update --check finalisation paths accordingly
- Fix write_state_file in --onboard not gated on DRY_RUN (was writing ACTIVE state on
  dry runs)

master_host1.conf:
- Add HOST1_PARTNERSHIP_OWN_CONTAINERS array
- Add partnership Emby provisioning config (toggle + port + per-host credentials)

master_host2.conf:
- Add HOST2_PARTNERSHIP_OWN_CONTAINERS array
- Add HOST2_PARTNERSHIP_EMBY_ADMIN_USER and HOST2_PARTNERSHIP_EMBY_ADMIN_PASS

Tailscale fix applied to:
- Initial_run/ssh_setup.sh (2 callsites)
- unRAID_Essentials/rsync_stop.sh (1 callsite)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 20:09:13 -04:00
Gmer4LfeandClaude Sonnet 4.6 009820e981 refactor: rename failover/HA → fallback across entire codebase
Removes all references to "failover" and "HA" (high availability)
terminology from variable names, config keys, state values, rsync
profile names, directory paths, and user-visible strings.

Mapping:
  FAILOVER_*              → FALLBACK_*
  FAILOVER_HOST*_RUNS_FOR → FALLBACK_HOST*_COVERS
  critical-failover       → critical-fallback
  emby-failover           → emby-fallback
  appdata-Failover/       → appdata-Fallback/
  "FAILOVER" state value  → "FALLBACK"
  failover_start key      → fallback_start
  Failover/ directory     → Fallback/
  failover.sh             → fallback.sh
  failover_state.db       → fallback_state.db
  -Failover folder suffix → -Fallback

State machine: NORMAL | FALLBACK | DARK (unchanged)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 19:28:21 -04:00
Gmer4LfeandClaude Sonnet 4.6 69464ba385 feat(partnership): add blocklist to block access after offboard
After offboard, the former partner's hostname is written to
/boot/config/partnership_blocklist.db. This blocks passive reconnection:
  - --check skips the remote entirely (no auto-reconnect noise)
  - rsync.sh refuses to sync with a blocklisted host
  - --onboard warns about the previous offboard but proceeds,
    and clears the block on success (onboard = deliberate intent)

New --unblock <hostname> mode removes an entry to permit re-onboarding
without running a full --onboard first. --status shows the full blocklist.

Blocklist file survives reboots (/boot/config) and Tailscale reconnections —
application-layer guard that complements Tailscale device removal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 18:59:29 -04:00
Gmer4LfeandClaude Sonnet 4.6 09e9cec0c3 feat(rsync): print status message when transfer starts
rsync output is fully captured — nothing visible while it runs.
Adds a "Rsync running — this may take a while..." line before each
attempt so the Unraid log viewer shows transfer progress clearly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 18:53:41 -04:00
FailedProxy ec7de648dc massive update. Master conf split, now modular with a load sceriprt to drive all configs to scripts. with unraid scpecific safeguard tests , and improved standardized ux. including dynamic host detect, who am i who else it there. EVERY SINGLE SCRIPT UPDATED. DEBATING THAT THIS IS ACUALLY V2 2026-05-03 17:16:49 -04:00
FailedProxy 1c765b7260 added rsync disable in master global tier 1, advanced selection tier 2 2026-04-28 17:07:44 -04:00
FailedProxy 11872b802b big logic update to rsync and rsync called scripts 2026-04-28 17:04:09 -04:00
FailedProxy d4bf31a5f4 true bidirectional with split truth modle set up. all scripts are fully bidirectional 2026-04-21 18:20:47 -04:00
FailedProxy e83473ab8e added safe guards to all scripts that need it. all reference comm.sh like it should be 2026-04-20 17:18:25 -04:00
FailedProxy c37f7adac6 small fixes 2026-04-15 17:58:25 -04:00
FailedProxy 6f2e19265b updated my variables in master.conf 2026-04-14 17:38:44 -04:00
FailedProxy 30da5e1477 updated rsync for switch 2026-04-12 00:14:18 -04:00
FailedProxy 6cc26c8fb9 added notify to all needed in unraid essentials 2026-04-09 17:20:09 -04:00
FailedProxy a5160c1af5 ux update and code cleanup 2026-04-06 23:19:04 +00:00
FailedProxy 8e4c588079 cleaned up some note 2026-04-06 01:18:40 +00:00
FailedProxy 9cad6ba306 added icons and improved ux 2026-04-06 01:11:30 +00:00
FailedProxy 227cdaac19 added share, rootfs, and disk checks 2026-04-06 00:58:37 +00:00
FailedProxy 2f18f0cb6b Enhanced log. fixed some general inconsistencies 2026-04-05 07:02:45 +00:00
FailedProxy 78d2c944c0 moved some things to common.sh 2026-04-05 06:39:30 +00:00
FailedProxy 1376bf3411 Changed daily script to master.conf variables 2026-04-05 06:13:05 +00:00
FailedProxy 889b058784 debug 2026-04-05 04:01:21 +00:00
FailedProxy 729fac99d4 getting back 2026-04-05 03:47:15 +00:00
FailedProxy 4bd864343b bug fixes 2026-03-27 22:35:52 +00:00
FailedProxy 6a29e7e61b stable 2026-03-27 20:30:51 +00:00
FailedProxy 0e1bb83ef1 Stable v1 framework 2026-03-27 19:29:41 +00:00
FailedProxy 2640e74b87 reverted back 2026-03-27 19:12:28 +00:00
FailedProxy 65e3d42e63 test 2026-03-27 19:08:11 +00:00
FailedProxy ef3924cf25 fuck 2026-03-27 19:04:49 +00:00
FailedProxy 766e53c172 test 2026-03-27 19:00:00 +00:00
FailedProxy 872821eaf5 test 2026-03-27 18:56:10 +00:00
FailedProxy 0766efdcf9 test 2026-03-27 18:52:07 +00:00
FailedProxy 098dc84585 fix 2026-03-27 18:50:59 +00:00
FailedProxy cf89d6c3ca test 2026-03-27 18:49:13 +00:00
FailedProxy a3d272a126 test 2026-03-27 18:46:50 +00:00
FailedProxy c043feb515 test 2026-03-27 18:40:09 +00:00
FailedProxy ef7eda3e62 test 2026-03-27 18:31:08 +00:00
FailedProxy fb6c76eb92 test 2026-03-27 18:27:04 +00:00
FailedProxy e2e628c000 test 2026-03-27 18:21:02 +00:00
FailedProxy 4887a9c36e progress bar 2026-03-27 18:19:08 +00:00
FailedProxy 3e96164465 Stable 2026-03-27 18:15:16 +00:00
FailedProxy dddfe7b655 imput handling fix 2026-03-27 18:12:39 +00:00
FailedProxy 5ece52b5e5 rsync input handling improv 2026-03-27 18:05:57 +00:00
FailedProxy 1b9f584fb9 Trying v1 framework again 2026-03-27 18:02:36 +00:00
FailedProxy 212faead11 fuck 2026-03-27 17:52:43 +00:00
FailedProxy f3abddddc2 tweak 2026-03-27 17:50:01 +00:00
FailedProxy 4faf5d2b96 Updated framework 2026-03-27 16:50:20 +00:00
FailedProxy 4ef4c1428c Structure change and vissually fixing code to make it easier to read 2026-03-26 22:35:44 +00:00
FailedProxy 3cc2796caa added status 2026-03-25 01:54:51 +00:00
FailedProxy 9a637b7ca8 seperated logg and echo a lot 2026-03-25 01:20:27 +00:00
FailedProxy b8b373784e added user facing messages echo and power user admin info logging with a true false for logging 2026-03-25 00:55:37 +00:00