LibrePortal/containers/focalboard/scripts/focalboard_update_specifics.sh
librelad 98e1a0a05d refactor(apps): per-app post-install hooks + move gluetun/crowdsec logic into their apps
Replace the central app-name if-ladder in app_update_specifics.sh with a generic
dispatcher: each app ships containers/<app>/scripts/<app>_update_specifics.sh
defining appUpdateSpecifics_<app> (live-sourced by the container scan, dispatched
by `declare -F` — same pattern as tools). A hook may set shouldrestart=true. Apps
with no specifics ship no hook.

- Move the adguard/pihole (DNS updater), dashy (conf refresh), focalboard (nobody
  ownership + restart), and libreportal (webui regen) branches to per-app hooks.
- Move scripts/gluetun/gluetun_route_apps.sh -> containers/gluetun/scripts/
  (scripts/gluetun/ removed).
- Move scripts/install/install_crowdsec.sh -> containers/crowdsec/scripts/
  crowdsec_install_host.sh; fix the path note in crowdsec.sh.
- Regenerate arrays (moved files drop out; the per-app files are container-scanned,
  not arrayed).

Dispatch verified with stubs: adguard/pihole/dashy/focalboard/libreportal behave
identically to the old ladder (incl. shouldrestart propagation), apps without a
hook are a clean no-op. The CLI itself had no per-app branches — app-specific CLI
is already the (now fully modular) tools system.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-25 23:38:19 +01:00

13 lines
552 B
Bash

#!/bin/bash
# Post-install/update specifics for Focalboard — dispatched by appUpdateSpecifics.
appUpdateSpecifics_focalboard() {
local app_name="$1"
# Focalboard runs as nobody (65534) and writes its sqlite db + uploads under
# its mounted data dir; fixPermissionsBeforeStart hands the dir to the install
# user, so give it to 65534 here or the server can't open the database.
# Setting shouldrestart (not local) requests the restart in appUpdateSpecifics.
runOwnership app-data-nobody "$app_name"
shouldrestart="true"
}