From 4db91d9fe81679b55fb8f036c11320fe1a2dbc03 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Fri, 23 Apr 2021 13:23:37 -0700 Subject: [PATCH] enabled /usr/local/etc/bashup.conf option --- README.md | 2 +- bashup.sh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) 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