organize and rename params
This commit is contained in:
parent
0b95c16f0f
commit
a52d3ace09
54
backup.sh
54
backup.sh
@ -335,45 +335,45 @@ if [ -n "$1" ] && [[ ! "$1" =~ ^- ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# use GetOpts to process parameters
|
# 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
|
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)
|
5)
|
||||||
# Full path to 503 error page
|
# Full path to 503 error page
|
||||||
err503Path="${OPTARG%/}"
|
err503Path="${OPTARG%/}"
|
||||||
err503File="${err503Path##*/}"
|
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)
|
b)
|
||||||
# path to file containing borgbackup settings and details
|
# path to file containing borgbackup settings and details
|
||||||
borgDetails="${OPTARG%/}"
|
borgDetails="${OPTARG%/}"
|
||||||
;;
|
;;
|
||||||
d)
|
d)
|
||||||
# Seafile data directory
|
# 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
|
# unrecognized parameters trigger scriptHelp
|
||||||
|
Loading…
Reference in New Issue
Block a user