Added documentations for USER functions.

This commit is contained in:
Serghey Rodin 2012-01-10 17:10:18 +02:00
commit 87fcc5d83b
26 changed files with 138 additions and 30 deletions

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: adding system user
# info: add system user
# options: user password email [package] [fname] [lname]
#
# The function creates new user account.
#----------------------------------------------------------#
# Variable&Function #
@ -56,10 +60,11 @@ is_package_valid "$package"
package_data=$(cat $V_PKG/$package.pkg)
# Checking shell
shell_conf=$(echo "$package_data"|grep 'SHELL'|cut -f 2 -d \')
shell_conf=$(echo "$package_data" | grep 'SHELL' | cut -f 2 -d \')
case $shell_conf in
nologin) shell='/sbin/nologin' ;;
bash) shell='/bin/bash' ;;
sh) shell='/bin/bash' ;;
*) shell='/sbin/nologin' ;;
esac
@ -95,8 +100,8 @@ chmod -R a+x $V_HOME/$user
# Checking quota
if [ ! -z "$DISK_QUOTA" ] && [ "$DISK_QUOTA" != 'no' ]; then
DISK_QUOTA=$(echo "$package_data"|grep 'DISK_QUOTA' | cut -f 2 -d \')
set_quota "$user" "$DISK_QUOTA"
DISK_QUOTA=$(echo "$package_data" | grep 'DISK_QUOTA' | cut -f 2 -d \')
#$V_BIN/v_add_user_quota "$user" "$DISK_QUOTA"
fi

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: schedule user backup
# info: schedule user backup creation
# options: user
#
# The function for scheduling user backup creation.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: adding user reports
# info: add user reports
# opions: user
#
# The script for enabling reports on cron tasks and administrative
# notifications.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: backup system user with all its objects
# options: user
#
# The call is used for backing up user with all its domains and databases.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,11 +1,14 @@
#!/bin/bash
# info: updating montly billing user report
# info: backup all users
# options: none
#
# The function backups all system users.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Importing system enviroment as we run this script
# mostly by cron wich not read it by itself
source /etc/profile.d/vesta.sh

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: changing user contact email
# info: change user contact email
# options: user email
#
# The function for changing of e-mail associated with a certain user.
#----------------------------------------------------------#
# Variable&Function #
@ -14,6 +18,7 @@ source $VESTA/conf/vars.conf
source $V_CONF/vesta.conf
source $V_FUNC/shared.func
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: changing user nameservers
# info: change user full name
# options: user fname lname
#
# The function allow to change user's full name.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: changing user nameservers
# info: change user nameservers
# options: user ns1 ns2 [ns3] [ns4] [ns5] [ns6] [ns7] [ns8]
#
# The function for changing default nameservers for speciefic user.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: changing user package
# info: change user package
# options: user package
#
# The function changes user's hosting package.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: changing user password
# info: change user password
# options: user password
#
# The function changes user's password and updates RKEY value.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: changing user shell
# info: change user shell
# options: user shell
#
# The function changes system shell of a user. Shell gives abilty to use ssh.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: deliting system user
# info: delete user
# options: user
#
# This function deletes a certain user and all his resourses such as domains,
# databases, cron jobs, etc.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: deliting system user ips
# info: delete user ips
# options: user
#
# The function deletes all user's ip addresses.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: adding user reports
# info: delete user reports
# options: user
#
# The script for disabling reports on cron tasks and administrative
# notifications.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: Getting system user value
# info: get user value
# options: user key
#
# The function for obtaining certain user's parameters.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: listing system user
# info: list system user
# options: user [format]
#
# The function for obtainig the list of all user's parameters.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: listing system bakups
# info: list user backups
# options: user [format]
#
# The function for obtainig the list of available user backups.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: listing user ips
# info: list user ips
# options user [format]
#
# The function for obtainig the list of available ip addresses.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: listing user nameservers
# info: list user nameservers
# options: user [format]
#
# Function for obtainig the list of user's DNS servers.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: listing sys user packages
# info: list user packages
# options: [format]
#
# The function for obtaining the list of available hosting packages.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: listing system users
# info: list system users
# options: [format]
#
# The function for obtainig the list of all server's users.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: Suspending sys user
# info: suspend user
# options: user
#
# The function suspends a certain user and all his objects.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: Unsuspending sys user
# info: unsuspend user
# options: user
#
# The function unsuspends user and all his objects.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: updating current backups for
# info: update user backups
# options: user
#
# The function rescan backup directory and updates backup database.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: updating montly billing user report
# info: update billing user billing
# options: user
#
# Function logs user parameters into billing database.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: updating disk usage for user directories
# info: update user disk usage
# options: user
#
# The functions recalculates disk usage and updates database.
#----------------------------------------------------------#
# Variable&Function #