From 6c5ea52c687ee02315566fdd1f4732eebf6e0d0c Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Thu, 23 May 2019 21:43:12 -0600 Subject: [PATCH] check for bad seafile sys username --- backup_new.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backup_new.sh b/backup_new.sh index 003e7f0..c7782f6 100755 --- a/backup_new.sh +++ b/backup_new.sh @@ -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