#!/bin/sh
set -eu
# fnOS updates TRIM_DATA_ACCESSIBLE_PATHS when an administrator changes the
# app's folder grants. Restart the package processes so they inherit the new
# authorized-path list; main is idempotent and keeps all state in app data.
APP_DIR="${TRIM_APPDEST:?}"
"$APP_DIR/cmd/main" stop
"$APP_DIR/cmd/main" start
