diff --git a/hanatool.sh b/hanatool.sh index 9c149d2..589382d 100644 --- a/hanatool.sh +++ b/hanatool.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Version: 1.5.5 +# Version: 1.5.6 # Author: Tomi Eckert # ============================================================================== # SAP HANA Schema and Tenant Management Tool (hanatool.sh) @@ -8,7 +8,22 @@ # ============================================================================== # --- Default Settings --- -HDBSQL_PATH="/usr/sap/hdbclient/hdbsql" +# Define potential HDB client paths +HDB_CLIENT_PATH_1="/usr/sap/hdbclient" +HDB_CLIENT_PATH_2="/usr/sap/NDB/HDB00/exe" + +# Determine the correct HDB_CLIENT_PATH +if [ -d "$HDB_CLIENT_PATH_1" ]; then + HDB_CLIENT_PATH="$HDB_CLIENT_PATH_1" +elif [ -d "$HDB_CLIENT_PATH_2" ]; then + HDB_CLIENT_PATH="$HDB_CLIENT_PATH_2" +else + echo "❌ Error: Neither '$HDB_CLIENT_PATH_1' nor '$HDB_CLIENT_PATH_2' found." + echo "Please install the SAP HANA client or adjust the paths in the script." + exit 1 +fi + +HDBSQL_PATH="${HDB_CLIENT_PATH}/hdbsql" COMPRESS=false THREADS=0 # 0 means auto-calculate later DRY_RUN=false diff --git a/packages.conf b/packages.conf index 67cea9a..d11d54e 100644 --- a/packages.conf +++ b/packages.conf @@ -15,4 +15,4 @@ SCRIPT_PACKAGES["backup"]="Backup Suite|1.0.8|A comprehensive script for backing SCRIPT_PACKAGES["monitor"]="Monitor Suite|1.3.1|Scripts for monitoring system health and performance metrics.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/monitor/monitor.sh https://git.technopunk.space/tomi/Scripts/raw/branch/main/monitor/monitor.conf|https://git.technopunk.space/tomi/Scripts/raw/branch/main/monitor/monitor.hook.sh" SCRIPT_PACKAGES["keymanager"]="Key Manager|1.2.3|A utility for managing HDB user keys for SAP HANA.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/keymanager.sh" SCRIPT_PACKAGES["cleaner"]="File Cleaner|1.1.0|A simple script to clean up temporary files and logs.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/cleaner.sh" -SCRIPT_PACKAGES["hanatool"]="HANA Tool|1.5.5|A command-line tool for various SAP HANA administration tasks.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/hanatool.sh" +SCRIPT_PACKAGES["hanatool"]="HANA Tool|1.5.6|A command-line tool for various SAP HANA administration tasks.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/hanatool.sh"