umbrel-apps/woofbot/hooks/pre-start
2023-01-05 23:15:06 +00:00

11 lines
354 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
APP_DATA_DIR="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)/data"
[ ! -d "${APP_DATA_DIR}" ] && mkdir -p "${APP_DATA_DIR}" && chown 1000:1000 "${APP_DATA_DIR}"
SERVER_LOGS_DIR="${APP_DATA_DIR}/server-logs"
[ ! -d "${SERVER_LOGS_DIR}" ] && mkdir -p "${SERVER_LOGS_DIR}" && chown 1000:1000 "${SERVER_LOGS_DIR}"