summaryrefslogtreecommitdiff
path: root/f3s
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-07-01 12:00:09 +0300
committerPaul Buetow <paul@buetow.org>2026-07-01 12:00:09 +0300
commitd573554fbb1d1275be0ce5302ffb334d9bcc511e (patch)
tree0d64f991209e0fbfcf9f600fe6a8c0a0230e22b7 /f3s
parent7ac7e5fe46d32751f23d1638f946783c03bb2fd4 (diff)
jellyfin: self-heal setup-wizard flag via initContainer
Adds ensure-wizard-completed initContainer after nfs-check-config. If jellyfin.db already exists but IsStartupWizardCompleted flipped to false (interrupted wizard run or partial config restore), restore it to true so a working instance never drops back into the setup wizard. Fresh installs (no jellyfin.db) keep their legitimate first-run wizard. Runs after the sentinel check so config is only rewritten on the real NFS volume.
Diffstat (limited to 'f3s')
-rw-r--r--f3s/jellyfin/helm-chart/templates/deployment.yaml25
1 files changed, 25 insertions, 0 deletions
diff --git a/f3s/jellyfin/helm-chart/templates/deployment.yaml b/f3s/jellyfin/helm-chart/templates/deployment.yaml
index 5bc48cd..72340f7 100644
--- a/f3s/jellyfin/helm-chart/templates/deployment.yaml
+++ b/f3s/jellyfin/helm-chart/templates/deployment.yaml
@@ -34,6 +34,31 @@ spec:
- name: jellyfin-config
mountPath: /mnt
readOnly: true
+ # Self-heal the setup-wizard flag. Runs only after nfs-check-config has
+ # proven /config is the real NFS directory (not a local-XFS shadow), so
+ # we never rewrite config on the wrong volume. If the DB already exists
+ # (server was set up) but IsStartupWizardCompleted flipped to false
+ # (e.g. an interrupted wizard run or partial config restore), restore it
+ # to true so a working instance never drops back into the setup wizard.
+ # A genuine fresh install has no jellyfin.db yet, so its first-run wizard
+ # is left untouched.
+ - name: ensure-wizard-completed
+ image: busybox:stable
+ command:
+ - sh
+ - -c
+ - |
+ cfg=/config/config/system.xml
+ if [ -f /config/data/jellyfin.db ] && \
+ grep -q "<IsStartupWizardCompleted>false</IsStartupWizardCompleted>" "$cfg" 2>/dev/null; then
+ echo "existing jellyfin.db present but setup-wizard flag was false; restoring to true"
+ sed -i 's#<IsStartupWizardCompleted>false</IsStartupWizardCompleted>#<IsStartupWizardCompleted>true</IsStartupWizardCompleted>#' "$cfg"
+ else
+ echo "no action: fresh install (no jellyfin.db) or wizard flag already true"
+ fi
+ volumeMounts:
+ - name: jellyfin-config
+ mountPath: /config
- name: nfs-check-libraries
image: busybox:stable
command: