Fixed path usage.
This commit is contained in:
parent
2fbe757896
commit
bd13cdd566
2 changed files with 6 additions and 2 deletions
0
config.sh.example
Normal file → Executable file
0
config.sh.example
Normal file → Executable file
|
@ -4,16 +4,20 @@ filename="$(hostname) $(date +'%Y-%m-%d %H%M%S')"
|
|||
skip_dbs=("mysql" "information_schema" "performance_schema" "sys")
|
||||
tmpdir="/tmp/fw-db-backup"
|
||||
workdir="$tmpdir/$filename"
|
||||
|
||||
mariadb_user=""
|
||||
mariadb_pass=""
|
||||
db_backups_depot="."
|
||||
|
||||
if [ ! -e config.sh ]; then
|
||||
current_dir="$(dirname "$0")"
|
||||
config_path="$current_dir/config.sh"
|
||||
|
||||
if [ ! -e "$config_path" ]; then
|
||||
echo "config.sh not found, copy config.sh.example if you haven't yet"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source ./config.sh
|
||||
source "$config_path"
|
||||
|
||||
echo "Resetting temp directory..."
|
||||
rm -rf "$tmpdir"
|
||||
|
|
Loading…
Reference in a new issue