File system quota support

This commit is contained in:
Serghey Rodin 2014-05-12 22:25:19 +03:00
commit 9087a5b57a
5 changed files with 214 additions and 7 deletions

View file

@ -97,17 +97,10 @@ if [ ! -z "$DNS_SYSTEM" ]; then
chmod 751 $HOMEDIR/$user/conf/dns
fi
# Set permissions
chmod a+x $HOMEDIR/$user
chattr +i $HOMEDIR/$user/conf
# Checking quota
if [ ! -z "$DISK_QUOTA" ]; then
DISK_QUOTA=$(echo "$pkg_data" | grep 'DISK_QUOTA' | cut -f 2 -d \')
#$BIN/v-add-user_quota "$user" "$DISK_QUOTA"
fi
#----------------------------------------------------------#
# Vesta #
@ -212,6 +205,12 @@ TIME='$TIME'
DATE='$DATE'" > $USER_DATA/user.conf
chmod 660 $USER_DATA/user.conf
# Updating quota
if [ "$DISK_QUOTA" = 'yes' ]; then
echo "Setting quota"
$BIN/v-update-user-quota "$user"
fi
# Updating admin counter
if [ "$user" != 'admin' ]; then
increase_user_value 'admin' '$U_USERS'