mirror of
https://github.com/getumbrel/umbrel-apps.git
synced 2026-11-30 09:00:40 +03:00
11 lines
539 B
Bash
Executable File
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}" |