feat(backup): Introduce backup hook script and adjust configuration
This commit is contained in:
16
backup/backup.hook.sh
Normal file
16
backup/backup.hook.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script helps to configure backup.conf
|
||||
|
||||
# Source the backup.conf to get current values
|
||||
source backup.conf
|
||||
|
||||
HDBSQL_PATH_INPUT=$(which hdbsql)
|
||||
|
||||
# Default values if not found
|
||||
HDBSQL_PATH_INPUT=${HDBSQL_PATH_INPUT:-"/usr/sap/hdbclient/hdbsql"}
|
||||
|
||||
# Update backup.conf
|
||||
sed -i "s#^HDBSQL_PATH=\".*\"#HDBSQL_PATH=\"$HDBSQL_PATH_INPUT\"#" backup.conf
|
||||
|
||||
echo "backup.conf updated successfully!"
|
||||
Reference in New Issue
Block a user