feat(keymanager): Add alternative path detection for the tools needed to manage users
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Version: 1.2.2
|
||||
# Version: 1.2.3
|
||||
# Author: Tomi Eckert
|
||||
|
||||
# A script to interactively manage SAP HANA hdbuserstore keys, with testing.
|
||||
@@ -13,7 +13,20 @@ COLOR_NC='\033[0m' # No Color
|
||||
|
||||
# --- Configuration ---
|
||||
# Adjust these paths if your HANA client is installed elsewhere.
|
||||
HDB_CLIENT_PATH="/usr/sap/hdbclient"
|
||||
# Define potential HDB client paths
|
||||
HDB_CLIENT_PATH_1="/usr/sap/hdbclient"
|
||||
HDB_CLIENT_PATH_2="/usr/sap/NDB/HDB00/exe"
|
||||
|
||||
# Check which path exists and set HDB_CLIENT_PATH accordingly
|
||||
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 -e "${COLOR_RED}❌ Error: Neither '$HDB_CLIENT_PATH_1' nor '$HDB_CLIENT_PATH_2' found.${COLOR_NC}"
|
||||
echo -e "${COLOR_RED}Please install the SAP HANA client or adjust the paths in the script.${COLOR_NC}"
|
||||
exit 1
|
||||
fi
|
||||
HDB_USERSTORE_EXEC="${HDB_CLIENT_PATH}/hdbuserstore"
|
||||
HDB_SQL_EXEC="${HDB_CLIENT_PATH}/hdbsql"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user