check for bad seafile sys username

This commit is contained in:
Asif Bacchus 2019-05-23 21:43:12 -06:00
parent b9aa8d33f4
commit 6c5ea52c68

View File

@ -172,8 +172,12 @@ while [ $# -gt 0 ]; do
-u|--user|--seafuser) -u|--user|--seafuser)
# name of seafile system user # name of seafile system user
if [ -n "$2" ]; then if [ -n "$2" ]; then
seafUser="${2%/}" if ! id "$2" > /dev/null 2>&1; then
shift badParam user "$@"
else
seafUser="${2%/}"
shift
fi
else else
badParam empty "$@" badParam empty "$@"
fi fi