removed seafUser param and checks

This commit is contained in:
Asif Bacchus 2019-05-24 21:23:36 -06:00
parent 42fd9349b7
commit e7e4658cd7

View File

@ -32,10 +32,6 @@ badParam () {
printf "${err}\nError: '%s %s': Service does not exist!${norm}\n\n" \ printf "${err}\nError: '%s %s': Service does not exist!${norm}\n\n" \
"$2" "$3" "$2" "$3"
exit 1 exit 1
elif [ "$1" = "user" ]; then
printf "${err}\nError: '%s %s': User does not exist!${norm}\n\n" \
"$2" "$3"
exit 1
fi fi
} }
@ -95,7 +91,6 @@ webroot="/usr/share/nginx/html"
offlineBackup=0 offlineBackup=0
seafService="seafile.service" seafService="seafile.service"
seafHub="seahub.service" seafHub="seahub.service"
seafUser="seafile"
seafDir="/opt/seafile" seafDir="/opt/seafile"
seafData="/var/seafile" seafData="/var/seafile"
@ -224,19 +219,6 @@ while [ $# -gt 0 ]; do
# shutdown seafile during backup # shutdown seafile during backup
offlineBackup=1 offlineBackup=1
;; ;;
-u|--user|--seafuser)
# name of seafile system user
if [ -n "$2" ]; then
if ! id "$2" > /dev/null 2>&1; then
badParam user "$@"
else
seafUser="${2%/}"
shift
fi
else
badParam empty "$@"
fi
;;
*) *)
printf "${err}\nUnknown option: %s\n" "$1" printf "${err}\nUnknown option: %s\n" "$1"
printf "${cyan}Use '--help' for valid options.{$norm}\n\n" printf "${cyan}Use '--help' for valid options.{$norm}\n\n"