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)
# name of seafile system user
if [ -n "$2" ]; then
seafUser="${2%/}"
shift
if ! id "$2" > /dev/null 2>&1; then
badParam user "$@"
else
seafUser="${2%/}"
shift
fi
else
badParam empty "$@"
fi