Files
umbrel-apps/immich/hooks/pre-start
T
2023-06-05 21:53:16 -07:00

11 lines
539 B
Bash
Executable File

#!/usr/bin/env bash
# This script sets up the necessary directories and permissions for model-cache and tsdata that were added after the initial release of the app.
set -euo pipefail
APP_DATA_DIR="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)/data"
MODEL_CACHE_DIR="${APP_DATA_DIR}/model-cache"
TYPESENSE_DIR="${APP_DATA_DIR}/tsdata"
[ ! -d "${MODEL_CACHE_DIR}" ] && mkdir -p "${MODEL_CACHE_DIR}" && chown 1000:1000 "${MODEL_CACHE_DIR}"
[ ! -d "${TYPESENSE_DIR}" ] && mkdir -p "${TYPESENSE_DIR}" && chown 1000:1000 "${TYPESENSE_DIR}"