diff --git a/README.md b/README.md index ec27879..8ad4b04 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ nano /usr/local/sbin/bashup.sh crontab -e ``` -The "nano /usr/local/sbin/bashup.cnf" command is optional. Do this if you need to override any of the configurable settings found at the top of the script. +The "nano /usr/local/sbin/bashup.conf" command is optional. Do this if you need to override any of the configurable settings found at the top of the bashup.sh script. For the crontab add an entry for each of the "backup" scripts that you'd like to run. For example, to back up files at 3:01 am every day add this crontab: diff --git a/bashup.sh b/bashup.sh index 0212841..052c17d 100755 --- a/bashup.sh +++ b/bashup.sh @@ -4,9 +4,7 @@ # https://git.stack-source.com/msb/bashup # MIT License Copyright (c) 2021 Matthew Saunders Brown -# # begin configurable vars -# # retention vars retention_years=0; @@ -26,9 +24,12 @@ defaults_extra_file='/etc/mysql/debian.cnf'; # list of mysql databases to skip exclusions=('information_schema' 'performance_schema' 'sys' 'wsrep'); -# # end configurable vars -# + +# check for local config, which can be used to override any of the above +if [[ -f /usr/local/etc/bashup.conf ]]; then + source /usr/local/etc/bashup.conf +fi # must be root, attempt sudo if need be if [ "${EUID}" -ne 0 ]; then