umbrel-apps/audiobookshelf/exports.sh
Jasper abd8a75fad
App Submission: Audiobookshelf (#302)
Co-authored-by: Steven Briscoe <me@stevenbriscoe.com>
2022-12-23 15:45:33 +00:00

16 lines
585 B
Bash

UMBREL_DATA_DIR="${UMBREL_ROOT}/data"
UMBREL_DATA_STORAGE_AUDIOBOOKS_DIR="${UMBREL_DATA_DIR}/storage/downloads/audiobooks"
UMBREL_DATA_STORAGE_PODCASTS_DIR="${UMBREL_DATA_DIR}/storage/downloads/podcasts"
DESIRED_OWNER="1000:1000"
if [[ ! -d "${UMBREL_DATA_STORAGE_AUDIOBOOKS_DIR}" ]]; then
mkdir -p "${UMBREL_DATA_STORAGE_AUDIOBOOKS_DIR}"
chown "${DESIRED_OWNER}" "${UMBREL_DATA_STORAGE_AUDIOBOOKS_DIR}"
fi
if [[ ! -d "${UMBREL_DATA_STORAGE_PODCASTS_DIR}" ]]; then
mkdir -p "${UMBREL_DATA_STORAGE_PODCASTS_DIR}"
chown "${DESIRED_OWNER}" "${UMBREL_DATA_STORAGE_PODCASTS_DIR}"
fi