Files
appstore/apps/oxidns/latest/scripts/init.sh
T

18 lines
388 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [[ -f "$SCRIPT_DIR/../.env" ]]; then
set -a
# shellcheck disable=SC1091
source "$SCRIPT_DIR/../.env"
set +a
fi
CONFIG_DIR="${APP_CONFIG_DIR:-./data}"
mkdir -p "$CONFIG_DIR"
if [ ! -f "$CONFIG_DIR/config.yaml" ]; then
cp "$SCRIPT_DIR/../data/config.yaml" "$CONFIG_DIR/config.yaml"
fi