pre-req: seafile user account
This commit is contained in:
		
							parent
							
								
									1330cc8e70
								
							
						
					
					
						commit
						1bd6ff7856
					
				
							
								
								
									
										16
									
								
								backup.sh
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								backup.sh
									
									
									
									
									
								
							@ -409,17 +409,17 @@ else
 | 
			
		||||
    fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
## Check Seafile webuser account
 | 
			
		||||
# Ensure Seafile webuser account is provided
 | 
			
		||||
if [ -z "$webUser" ]; then
 | 
			
		||||
    echo -e "\n${err}The webuser account running Seafile must be provided" \
 | 
			
		||||
## Check Seafile user account
 | 
			
		||||
# Ensure Seafile user account is provided
 | 
			
		||||
if [ -z "$seafUser" ]; then
 | 
			
		||||
    echo -e "\n${err}The user account running Seafile must be provided" \
 | 
			
		||||
        "(-u parameter)${normal}\n"
 | 
			
		||||
    exit 1
 | 
			
		||||
# Check if supplied webUser account exists
 | 
			
		||||
elif [ -n "$webUser" ]; then
 | 
			
		||||
    user_exists=$(id -u "$webUser" > /dev/null 2>&1; echo $?)
 | 
			
		||||
# Check if supplied seafUser account exists
 | 
			
		||||
else
 | 
			
		||||
    user_exists=$(id -u "$seafUser" > /dev/null 2>&1; echo $?)
 | 
			
		||||
    if [ "$user_exists" -ne 0 ]; then
 | 
			
		||||
        echo -e "\n${err}The supplied webuser account (-u parameter) does not" \
 | 
			
		||||
        echo -e "\n${err}The supplied user account (-u parameter) does not" \
 | 
			
		||||
            "exist.${normal}\n"
 | 
			
		||||
        exit 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user