removed seafUser param and checks
This commit is contained in:
parent
42fd9349b7
commit
e7e4658cd7
@ -32,10 +32,6 @@ badParam () {
|
||||
printf "${err}\nError: '%s %s': Service does not exist!${norm}\n\n" \
|
||||
"$2" "$3"
|
||||
exit 1
|
||||
elif [ "$1" = "user" ]; then
|
||||
printf "${err}\nError: '%s %s': User does not exist!${norm}\n\n" \
|
||||
"$2" "$3"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
@ -95,7 +91,6 @@ webroot="/usr/share/nginx/html"
|
||||
offlineBackup=0
|
||||
seafService="seafile.service"
|
||||
seafHub="seahub.service"
|
||||
seafUser="seafile"
|
||||
seafDir="/opt/seafile"
|
||||
seafData="/var/seafile"
|
||||
|
||||
@ -224,19 +219,6 @@ while [ $# -gt 0 ]; do
|
||||
# shutdown seafile during backup
|
||||
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 "${cyan}Use '--help' for valid options.{$norm}\n\n"
|
||||
|
Loading…
Reference in New Issue
Block a user