organize and rename params

This commit is contained in:
Asif Bacchus 2019-05-19 00:24:04 -06:00
parent 0b95c16f0f
commit a52d3ace09

View File

@ -335,45 +335,45 @@ if [ -n "$1" ] && [[ ! "$1" =~ ^- ]]; then
fi
# use GetOpts to process parameters
while getopts ':l:n:u:v5:w:s:b:d:' PARAMS; do
while getopts ':5:b:d:l:p:s:u:v:w:' PARAMS; do
case "$PARAMS" in
l)
# use provided location for logFile
logFile="${OPTARG%/}"
;;
n)
# Seafile webroot
ncRoot="${OPTARG%/}"
;;
u)
# webuser
webUser="${OPTARG}"
;;
v)
# verbose output from Borg
borgCreateParams='--list --stats'
borgPruneParams='--list'
;;
5)
# Full path to 503 error page
err503Path="${OPTARG%/}"
err503File="${err503Path##*/}"
;;
w)
# path to webserver webroot to copy 503 error page
webroot="${OPTARG%/}"
;;
s)
# path to file containing SQL login details
sqlDetails="${OPTARG%/}"
;;
b)
# path to file containing borgbackup settings and details
borgDetails="${OPTARG%/}"
;;
d)
# Seafile data directory
ncDataDir="${OPTARG%/}"
dataDir="${OPTARG%/}"
;;
l)
# use provided location for logFile
logFile="${OPTARG%/}"
;;
p)
# Seafile program directory
seafDir="${OPTARG%/}"
;;
s)
# path to file containing SQL login details
sqlDetails="${OPTARG%/}"
;;
u)
# Seafile system user
seafUser="${OPTARG}"
;;
v)
# verbose output from Borg
borgCreateParams='--list --stats'
borgPruneParams='--list'
;;
w)
# path to webserver webroot to copy 503 error page
webroot="${OPTARG%/}"
;;
?)
# unrecognized parameters trigger scriptHelp