We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2850492 commit 62a495bCopy full SHA for 62a495b
bin/v-update-user-quota
@@ -31,12 +31,19 @@ is_object_valid 'user' 'USER' "$user"
31
#----------------------------------------------------------#
32
33
# Updating disk quota
34
-soft=$(get_user_value '$DISK_QUOTA')
35
-soft=$((soft * 1000))
36
-hard=$((soft + 50000))
+quota=$(get_user_value '$DISK_QUOTA')
+soft=$((quota * 1000))
+hard=$((quota + 50000))
37
38
+# Searching home mount point
39
mnt=$(df -P /home |awk '{print $6}' |tail -n1)
-setquota $user $soft $hard 0 0 $mnt
40
+
41
+# Checking unlinmited quota
42
+if [ "$quota" = 'unlimited' ]; then
43
+ setquota $user 0 0 0 0 $mnt
44
+else
45
+ setquota $user $soft $hard 0 0 $mnt
46
+fi
47
48
49
0 commit comments