added a MAIN_DIR variable, and tweaked the conf sample and cron files to reflect how this is deployed in practice

This commit is contained in:
Dave Lane 2021-08-19 05:16:01 +00:00
parent 5642cfc67c
commit 4eec9fbcf9
3 changed files with 13 additions and 17 deletions

View file

@ -33,7 +33,7 @@ VERBOSE=1
#
# Stuff that should be universal for this install...
# where we can find this app...
MAIN_DIR=/home/dave/sqlite_backup
#MAIN_DIR=/home//sqlite_backup
# determine today's date
DATE=`date '+%Y-%m-%d-%a'`
# determine today's date
@ -196,11 +196,11 @@ if ! [[ $TASK == 'HOURLY' ]] ; then
create_tmp_email
fi
#
if test -f $MAIN_DIR/$BU_CONF ; then
verbose "Reading default in $MAIN_DIR/$BU_CONF"
source $MAIN_DIR/$BU_CONF
if test -f $BU_CONF ; then
verbose "Reading default in $BU_CONF"
source $BU_CONF
else
message "ERROR: Couldn't find or read $MAIN_DIR/$BU_CONF"
message "ERROR: Couldn't find or read $BU_CONF"
exit 1
fi
#