From 5dfa59b37a0076d7372c9ba2dc77519c32155756 Mon Sep 17 00:00:00 2001 From: Joao C Costa Date: Wed, 17 Aug 2016 11:02:34 +0100 Subject: [PATCH] Defaults config can be overridden by env var In some environments (hosted machines), /etc/... is not available. This PR provides a bit more flexibility. --- automysqlbackup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automysqlbackup b/automysqlbackup index 516b4f1..2a2f830 100755 --- a/automysqlbackup +++ b/automysqlbackup @@ -55,7 +55,7 @@ let "N_backup_local_nofiles=0x20" # @info: Default configuration options. # @deps: (none) load_default_config() { - CONFIG_configfile="/etc/automysqlbackup/automysqlbackup.conf" + CONFIG_configfile="${CONFIG_configfile:-/etc/automysqlbackup/automysqlbackup.conf}" CONFIG_backup_dir='/var/backup/db' CONFIG_multicore='yes' CONFIG_multicore_threads=2 @@ -2252,4 +2252,4 @@ elif (( $# == 0 )) && (( ${#opt_flags[@]} == 0 )); then method_backup fi -# END __main \ No newline at end of file +# END __main