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")
|
skip_dbs=("mysql" "information_schema" "performance_schema" "sys")
|
||||||
tmpdir="/tmp/fw-db-backup"
|
tmpdir="/tmp/fw-db-backup"
|
||||||
workdir="$tmpdir/$filename"
|
workdir="$tmpdir/$filename"
|
||||||
|
|
||||||
mariadb_user=""
|
mariadb_user=""
|
||||||
mariadb_pass=""
|
mariadb_pass=""
|
||||||
db_backups_depot="."
|
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"
|
echo "config.sh not found, copy config.sh.example if you haven't yet"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source ./config.sh
|
source "$config_path"
|
||||||
|
|
||||||
echo "Resetting temp directory..."
|
echo "Resetting temp directory..."
|
||||||
rm -rf "$tmpdir"
|
rm -rf "$tmpdir"
|
||||||
|
|
Loading…
Reference in a new issue