check for file/dir DNE
This commit is contained in:
parent
6c5ea52c68
commit
1b3b151008
@ -131,9 +131,13 @@ while [ $# -gt 0 ]; do
|
||||
-5|--503)
|
||||
# FULL path to 503 file
|
||||
if [ -n "$2" ]; then
|
||||
if [ -f "$2" ]; then
|
||||
err503Path="${2%/}"
|
||||
err503File="${2##*/}"
|
||||
shift
|
||||
else
|
||||
badParam dne "$@"
|
||||
fi
|
||||
else
|
||||
badParam empty "$@"
|
||||
fi
|
||||
@ -141,8 +145,12 @@ while [ $# -gt 0 ]; do
|
||||
-w|--webroot)
|
||||
# path to webroot (copy 503)
|
||||
if [ -n "$2" ]; then
|
||||
if [ -f "$2" ]; then
|
||||
webroot="${2%/}"
|
||||
shift
|
||||
else
|
||||
badParam dne "$@"
|
||||
fi
|
||||
else
|
||||
badParam empty "$@"
|
||||
fi
|
||||
@ -150,8 +158,12 @@ while [ $# -gt 0 ]; do
|
||||
-p|--seaf|--seafdir)
|
||||
# path to seafile program directory
|
||||
if [ -n "$2" ]; then
|
||||
if [ -d "$2" ]; then
|
||||
seafDir="${2%/}"
|
||||
shift
|
||||
else
|
||||
badParam dne "$@"
|
||||
fi
|
||||
else
|
||||
badParam empty "$@"
|
||||
fi
|
||||
@ -159,8 +171,12 @@ while [ $# -gt 0 ]; do
|
||||
-d|--data|--datadir|--seafdata)
|
||||
# path to seafile data directory
|
||||
if [ -n "$2" ]; then
|
||||
if [ -d "$2" ]; then
|
||||
seafData="${2%/}"
|
||||
shift
|
||||
else
|
||||
badParam dne "$@"
|
||||
fi
|
||||
else
|
||||
badParam empty "$@"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user