mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
fix for fs quota unlim
This commit is contained in:
parent
2850492f55
commit
62a495bd21
1 changed files with 11 additions and 4 deletions
|
@ -31,12 +31,19 @@ is_object_valid 'user' 'USER' "$user"
|
|||
#----------------------------------------------------------#
|
||||
|
||||
# Updating disk quota
|
||||
soft=$(get_user_value '$DISK_QUOTA')
|
||||
soft=$((soft * 1000))
|
||||
hard=$((soft + 50000))
|
||||
quota=$(get_user_value '$DISK_QUOTA')
|
||||
soft=$((quota * 1000))
|
||||
hard=$((quota + 50000))
|
||||
|
||||
# Searching home mount point
|
||||
mnt=$(df -P /home |awk '{print $6}' |tail -n1)
|
||||
setquota $user $soft $hard 0 0 $mnt
|
||||
|
||||
# Checking unlinmited quota
|
||||
if [ "$quota" = 'unlimited' ]; then
|
||||
setquota $user 0 0 0 0 $mnt
|
||||
else
|
||||
setquota $user $soft $hard 0 0 $mnt
|
||||
fi
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue