Skip to content

Commit 979acdd

Browse files
committed
Merge pull request hestiacp#453 from SCelik/patch-1
Update v-update-user-quota
2 parents e5eecb9 + 83f1b3a commit 979acdd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/v-update-user-quota

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ is_object_valid 'user' 'USER' "$user"
3131
#----------------------------------------------------------#
3232

3333
# Updating disk quota
34+
# Had quota equals package value. Soft quota equals 90% of package value for warnings.
3435
quota=$(get_user_value '$DISK_QUOTA')
35-
soft=$((quota * 1000))
36-
hard=$((quota + 50000))
36+
soft=$((quota * 1024 * 0.90))
37+
hard=$((quota * 1024))
3738

3839
# Searching home mount point
3940
mnt=$(df -P /home |awk '{print $6}' |tail -n1)

0 commit comments

Comments
 (0)