mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-02-03 02:43:50 +00:00
feat: add import/ directory for user database and config files
- Created import/db/ for custom SQL files - Created import/conf/ for configuration overrides - Added comprehensive README with usage examples - Created example files for NPCs and playerbots config - Updated import-database-files.sh to support new directory - Maintains backward compatibility with database-import/ - Includes .gitignore to prevent accidental commits of sensitive data
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copy user database files or full backup archives from database-import/ to backup system
|
||||
# Copy user database files or full backup archives from import/db/ or database-import/ to backup system
|
||||
set -euo pipefail
|
||||
|
||||
# Source environment variables
|
||||
@@ -9,7 +9,15 @@ if [ -f ".env" ]; then
|
||||
set +a
|
||||
fi
|
||||
|
||||
IMPORT_DIR="./database-import"
|
||||
# Support both new (import/db) and legacy (database-import) directories
|
||||
IMPORT_DIR_NEW="./import/db"
|
||||
IMPORT_DIR_LEGACY="./database-import"
|
||||
|
||||
# Prefer new directory if it has files, otherwise fall back to legacy
|
||||
IMPORT_DIR="$IMPORT_DIR_NEW"
|
||||
if [ ! -d "$IMPORT_DIR" ] || [ -z "$(ls -A "$IMPORT_DIR" 2>/dev/null)" ]; then
|
||||
IMPORT_DIR="$IMPORT_DIR_LEGACY"
|
||||
fi
|
||||
STORAGE_PATH="${STORAGE_PATH:-./storage}"
|
||||
STORAGE_PATH_LOCAL="${STORAGE_PATH_LOCAL:-./local-storage}"
|
||||
BACKUP_ROOT="${STORAGE_PATH}/backups"
|
||||
|
||||
Reference in New Issue
Block a user