mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
File system quota support
This commit is contained in:
parent
391c6ca5c5
commit
9087a5b57a
5 changed files with 214 additions and 7 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue