Files
appstore/apps/simplex-smp-server/7.0.1/scripts/upgrade.sh

15 lines
329 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
if [[ -f ./.env ]]; then
set -a
# shellcheck disable=SC1091
source ./.env
set +a
fi
CONFIG_DIR="${APP_CONFIG_DIR:-./data/config}"
STATE_DIR="${APP_STATE_DIR:-./data/state}"
mkdir -p "$CONFIG_DIR" "$STATE_DIR"
rm -f "$STATE_DIR"/smp-server-stats.log "$STATE_DIR"/smp-server-stats.daily.log