Only one configuration file for all database creation/drop scripts.

This commit is contained in:
2019-11-05 15:14:58 +01:00
parent 7894f27be1
commit aa98cc0fbc
10 changed files with 129 additions and 200 deletions

View File

@@ -1,7 +1,9 @@
#!/usr/bin/env bash
script_name="$(basename $(realpath $0))"
working_dir="$(dirname $(realpath $0))"
conf_file="${working_dir}/conf/optimize_mysql_tables.conf"
conf_file="${working_dir}/conf/mysql_credetials.conf"
tmp_log_file="$(mktemp)"
@@ -9,8 +11,8 @@ tmp_log_file="$(mktemp)"
# -------------
# - Variable settings
# -------------
DEFAULT_MYSQL_CREDENTIAL_ARGS="--login-path=local"
DEFAULT_LOG_FILE="/var/log/optimize_mysql_tables.log"
DEFAULT_MYSQL_CREDENTIAL_ARGS="--defaults-file=/usr/local/mysql/sys-maint.cnf"
DEFAULT_LOG_FILE="/var/log/${script_name%%.*}.log"
VERBOSE=false