Skip to content

Commit 87fcc5d

Browse files
committed
Added documentations for USER functions.
1 parent 7bcc447 commit 87fcc5d

26 files changed

+138
-30
lines changed

bin/v_add_user

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
2-
# info: adding system user
2+
# info: add system user
3+
# options: user password email [package] [fname] [lname]
4+
#
5+
# The function creates new user account.
6+
37

48
#----------------------------------------------------------#
59
# Variable&Function #
@@ -56,10 +60,11 @@ is_package_valid "$package"
5660
package_data=$(cat $V_PKG/$package.pkg)
5761

5862
# Checking shell
59-
shell_conf=$(echo "$package_data"|grep 'SHELL'|cut -f 2 -d \')
63+
shell_conf=$(echo "$package_data" | grep 'SHELL' | cut -f 2 -d \')
6064
case $shell_conf in
6165
nologin) shell='/sbin/nologin' ;;
6266
bash) shell='/bin/bash' ;;
67+
sh) shell='/bin/bash' ;;
6368
*) shell='/sbin/nologin' ;;
6469
esac
6570

@@ -95,8 +100,8 @@ chmod -R a+x $V_HOME/$user
95100

96101
# Checking quota
97102
if [ ! -z "$DISK_QUOTA" ] && [ "$DISK_QUOTA" != 'no' ]; then
98-
DISK_QUOTA=$(echo "$package_data"|grep 'DISK_QUOTA' | cut -f 2 -d \')
99-
set_quota "$user" "$DISK_QUOTA"
103+
DISK_QUOTA=$(echo "$package_data" | grep 'DISK_QUOTA' | cut -f 2 -d \')
104+
#$V_BIN/v_add_user_quota "$user" "$DISK_QUOTA"
100105
fi
101106

102107

bin/v_add_user_backup

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
2-
# info: schedule user backup
2+
# info: schedule user backup creation
3+
# options: user
4+
#
5+
# The function for scheduling user backup creation.
6+
37

48
#----------------------------------------------------------#
59
# Variable&Function #

bin/v_add_user_reports

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/bash
2-
# info: adding user reports
2+
# info: add user reports
3+
# opions: user
4+
#
5+
# The script for enabling reports on cron tasks and administrative
6+
# notifications.
7+
38

49
#----------------------------------------------------------#
510
# Variable&Function #

bin/v_backup_user

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22
# info: backup system user with all its objects
3+
# options: user
4+
#
5+
# The call is used for backing up user with all its domains and databases.
6+
37

48
#----------------------------------------------------------#
59
# Variable&Function #

bin/v_backup_users

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
#!/bin/bash
2-
# info: updating montly billing user report
2+
# info: backup all users
3+
# options: none
4+
#
5+
# The function backups all system users.
6+
37

48
#----------------------------------------------------------#
59
# Variable&Function #
610
#----------------------------------------------------------#
711

8-
912
# Importing system enviroment as we run this script
10-
# mostly by cron wich not read it by itself
13+
# mostly by cron wich not read it by itself
1114
source /etc/profile.d/vesta.sh
1215

1316
# Importing variables

bin/v_change_user_contact

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
2-
# info: changing user contact email
2+
# info: change user contact email
3+
# options: user email
4+
#
5+
# The function for changing of e-mail associated with a certain user.
6+
37

48
#----------------------------------------------------------#
59
# Variable&Function #
@@ -14,6 +18,7 @@ source $VESTA/conf/vars.conf
1418
source $V_CONF/vesta.conf
1519
source $V_FUNC/shared.func
1620

21+
1722
#----------------------------------------------------------#
1823
# Verifications #
1924
#----------------------------------------------------------#

bin/v_change_user_name

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
2-
# info: changing user nameservers
2+
# info: change user full name
3+
# options: user fname lname
4+
#
5+
# The function allow to change user's full name.
6+
37

48
#----------------------------------------------------------#
59
# Variable&Function #

bin/v_change_user_ns

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
2-
# info: changing user nameservers
2+
# info: change user nameservers
3+
# options: user ns1 ns2 [ns3] [ns4] [ns5] [ns6] [ns7] [ns8]
4+
#
5+
# The function for changing default nameservers for speciefic user.
6+
37

48
#----------------------------------------------------------#
59
# Variable&Function #

bin/v_change_user_package

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
2-
# info: changing user package
2+
# info: change user package
3+
# options: user package
4+
#
5+
# The function changes user's hosting package.
6+
37

48
#----------------------------------------------------------#
59
# Variable&Function #

bin/v_change_user_password

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
2-
# info: changing user password
2+
# info: change user password
3+
# options: user password
4+
#
5+
# The function changes user's password and updates RKEY value.
6+
37

48
#----------------------------------------------------------#
59
# Variable&Function #

0 commit comments

Comments
 (0)