From 03beb0295650d631e41711a15c8e388197bfe2d4 Mon Sep 17 00:00:00 2001 From: Tomi Eckert Date: Wed, 24 Sep 2025 20:59:35 +0200 Subject: [PATCH] update aurora messages --- aurora/aurora.sh | 42 +++++++++++++++++++++--------------------- packages.conf | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/aurora/aurora.sh b/aurora/aurora.sh index a475ad5..dad67be 100644 --- a/aurora/aurora.sh +++ b/aurora/aurora.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Version: 1.2.4 +# Version: 1.2.5 # Exit immediately if a command exits with a non-zero status. set -e @@ -9,7 +9,7 @@ SCRIPT_DIR=$(dirname "$0") CONFIG_FILE="${SCRIPT_DIR}/aurora.conf" if [ ! -f "$CONFIG_FILE" ]; then - echo "Error: Configuration file not found at ${CONFIG_FILE}" >&2 + echo "❌ Error: Configuration file not found at '${CONFIG_FILE}'" >&2 exit 1 fi # shellcheck source=aurora.conf @@ -25,7 +25,7 @@ COMPNYNAME="${SCHEMA#SBO_}" # === FUNCTIONS === run_sql() { - echo "Executing: $1" + echo "ℹ️ Executing: $1" "$HDBSQL" -U "${BACKOP_USER}" "$1" >/dev/null } @@ -44,62 +44,62 @@ usage() { } export_schema() { - echo "Starting schema export for '${SCHEMA}'." + echo "⬇️ Starting schema export for '${SCHEMA}'..." mkdir -p "$AURORA_TEMP_DIR" run_sql "EXPORT \"${SCHEMA}\".\"*\" AS BINARY INTO '$AURORA_TEMP_DIR' WITH REPLACE;" - echo "Schema export completed." + echo "✅ Schema export completed." } import_and_rename() { - echo "Starting import and rename to '${AURORA}'." + echo "⬆️ Starting import and rename to '${AURORA}'..." run_sql "IMPORT \"${SCHEMA}\".\"*\" FROM '$AURORA_TEMP_DIR' WITH REPLACE RENAME SCHEMA \"${SCHEMA}\" TO \"${AURORA}\";" - echo "Updating company name fields." + echo "ℹ️ Updating company name fields..." "$HDBSQL" -U "${BACKOP_USER}" -c ";" -I - </dev/null || echo "Could not drop schema '${AURORA}'. It might not exist." >&2 - echo "Old schema dropped." + echo "🗑️ Dropping existing '${AURORA}' schema..." + run_sql "DROP SCHEMA \"${AURORA}\" CASCADE;" 2>/dev/null || echo "⚠️ Could not drop schema '${AURORA}'. It might not exist." >&2 + echo "✅ Old schema dropped." } run_post_scripts() { - echo "Running post-import SQL scripts: ${POST_SQL}" + echo "⚙️ Running post-import SQL scripts: ${POST_SQL}..." for sql_file in $POST_SQL; do - echo "Running script: ${sql_file}" + echo " - Running script: ${sql_file}" "$HDBSQL" -U "${BACKOP_USER}" -I "${SCRIPT_ROOT}/${sql_file}" done - echo "All post-import scripts completed." + echo "✅ All post-import scripts completed." } cleanup_exported_files() { - echo "Cleaning up exported files from '${AURORA_TEMP_DIR}'." + echo "🧹 Cleaning up exported files from '${AURORA_TEMP_DIR}'..." rm -rf "$AURORA_TEMP_DIR" - echo "Exported files cleaned up." + echo "✅ Exported files cleaned up." } # === SCRIPT EXECUTION === if [ $# -eq 0 ]; then - echo "=== Starting 'complete' operation (default) ===" + echo "🚀 Starting 'complete' operation (default)..." drop_aurora_schema export_schema import_and_rename grant_privileges run_post_scripts cleanup_exported_files - echo "=== 'Complete' operation finished successfully ===" + echo "🎉 'Complete' operation finished successfully!" exit 0 fi @@ -108,7 +108,7 @@ case "$1" in show_info ;; *) - echo "Error: Invalid argument '$1'." >&2 + echo "❌ Error: Invalid argument '$1'." >&2 usage exit 1 ;; diff --git a/packages.conf b/packages.conf index edb4891..04e8756 100644 --- a/packages.conf +++ b/packages.conf @@ -7,7 +7,7 @@ declare -A SCRIPT_PACKAGES # The version should match the "# Version: x.x.x" line in the main script file. -SCRIPT_PACKAGES["Aurora Suite"]="1.2.4|https://git.technopunk.space/tomi/Scripts/raw/branch/main/aurora/aurora.sh https://git.technopunk.space/tomi/Scripts/raw/branch/main/aurora/aurora.conf" +SCRIPT_PACKAGES["Aurora Suite"]="1.2.5|https://git.technopunk.space/tomi/Scripts/raw/branch/main/aurora/aurora.sh https://git.technopunk.space/tomi/Scripts/raw/branch/main/aurora/aurora.conf" SCRIPT_PACKAGES["Backup Suite"]="1.0.5|https://git.technopunk.space/tomi/Scripts/raw/branch/main/backup/backup.sh https://git.technopunk.space/tomi/Scripts/raw/branch/main/backup/backup.conf" SCRIPT_PACKAGES["Monitor Suite"]="1.0.5|https://git.technopunk.space/tomi/Scripts/raw/branch/main/monitor/monitor.sh https://git.technopunk.space/tomi/Scripts/raw/branch/main/monitor/monitor.conf" SCRIPT_PACKAGES["Key Manager"]="1.2.1|https://git.technopunk.space/tomi/Scripts/raw/branch/main/hdb_keymanager.sh"