set default variable values

This commit is contained in:
Asif Bacchus 2019-05-23 20:57:05 -06:00
parent d14bc2a77f
commit fabea27ffd

View File

@ -51,20 +51,31 @@ stamp () {
### default variable values ### default variable values
## script related
# store logfile in the same directory as this script file using the same file # store logfile in the same directory as this script file using the same file
# name as the script but with the extension '.log' # name as the script but with the extension '.log'
scriptPath="$( CDPATH= cd -- "$( dirname -- "$0" )" && pwd -P )" scriptPath="$( CDPATH= cd -- "$( dirname -- "$0" )" && pwd -P )"
scriptName="$( basename "$0" )" scriptName="$( basename "$0" )"
logFile="$scriptPath/${scriptName%.*}.log" logFile="$scriptPath/${scriptName%.*}.log"
# borg output verbosity -- normal
borgCreateParams='--stats'
borgPruneParams='--list'
detailsFile="$scriptPath/seafbackup.details"
# seafile service # 503 related
err503Path="$scriptPath/503_backup.html"
err503File="${err503Path##*/}"
webroot="/usr/share/nginx/html"
# seafile related
offlineBackup=0 offlineBackup=0
seafSvc="seafile.service" seafSvc="seafile.service"
seafHub="seahub.service" seafHub="seahub.service"
seafUser="seafile"
# seafile directories
seafDir="/opt/seafile" seafDir="/opt/seafile"
dataDir="/var/seafile" seafData="/var/seafile"
### start logging ### start logging
printf "${mag}[%s] --- Start %s execution ---${norm}\n" \ printf "${mag}[%s] --- Start %s execution ---${norm}\n" \