From d6d80b56379cb69396927ac9029812e064d29ae5 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 24 Dec 2012 11:18:13 +0200 Subject: [PATCH 01/13] fixed title padding --- web/templates/admin/add_package.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/templates/admin/add_package.html b/web/templates/admin/add_package.html index 0645036a..7d9cc7f9 100644 --- a/web/templates/admin/add_package.html +++ b/web/templates/admin/add_package.html @@ -10,7 +10,7 @@ - diff --git a/web/templates/admin/list_mail.html b/web/templates/admin/list_mail.html index 0824e805..c725955c 100644 --- a/web/templates/admin/list_mail.html +++ b/web/templates/admin/list_mail.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/admin/list_mail_acc.html b/web/templates/admin/list_mail_acc.html index ada142a1..41784595 100644 --- a/web/templates/admin/list_mail_acc.html +++ b/web/templates/admin/list_mail_acc.html @@ -8,7 +8,7 @@
- +
diff --git a/web/templates/admin/list_packages.html b/web/templates/admin/list_packages.html index a13395dd..260a31f4 100644 --- a/web/templates/admin/list_packages.html +++ b/web/templates/admin/list_packages.html @@ -8,7 +8,7 @@
- +
diff --git a/web/templates/admin/list_rrd.html b/web/templates/admin/list_rrd.html index 0d3697cc..4b180084 100644 --- a/web/templates/admin/list_rrd.html +++ b/web/templates/admin/list_rrd.html @@ -11,7 +11,7 @@
- +
diff --git a/web/templates/admin/list_stats.html b/web/templates/admin/list_stats.html index 35eb1309..ba662cd5 100644 --- a/web/templates/admin/list_stats.html +++ b/web/templates/admin/list_stats.html @@ -25,7 +25,7 @@
- +
diff --git a/web/templates/admin/list_user.html b/web/templates/admin/list_user.html index 1c59f5a2..092b7123 100644 --- a/web/templates/admin/list_user.html +++ b/web/templates/admin/list_user.html @@ -14,7 +14,7 @@
- +
diff --git a/web/templates/admin/list_web.html b/web/templates/admin/list_web.html index 2e299c26..1e946bcf 100644 --- a/web/templates/admin/list_web.html +++ b/web/templates/admin/list_web.html @@ -8,7 +8,7 @@
- +
diff --git a/web/templates/user/list_cron.html b/web/templates/user/list_cron.html index 8f7dc93b..079d2be8 100644 --- a/web/templates/user/list_cron.html +++ b/web/templates/user/list_cron.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/user/list_db.html b/web/templates/user/list_db.html index 7d91b1bb..0ee65aa8 100644 --- a/web/templates/user/list_db.html +++ b/web/templates/user/list_db.html @@ -8,7 +8,7 @@
- +
diff --git a/web/templates/user/list_dns.html b/web/templates/user/list_dns.html index efdd9e40..d7cb09bd 100644 --- a/web/templates/user/list_dns.html +++ b/web/templates/user/list_dns.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/user/list_dns_rec.html b/web/templates/user/list_dns_rec.html index d8d46a9a..ee764ade 100644 --- a/web/templates/user/list_dns_rec.html +++ b/web/templates/user/list_dns_rec.html @@ -8,7 +8,7 @@
- +
diff --git a/web/templates/user/list_mail.html b/web/templates/user/list_mail.html index a4b79d5e..9628f6db 100644 --- a/web/templates/user/list_mail.html +++ b/web/templates/user/list_mail.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/user/list_mail_acc.html b/web/templates/user/list_mail_acc.html index d59367bc..8b700d8e 100644 --- a/web/templates/user/list_mail_acc.html +++ b/web/templates/user/list_mail_acc.html @@ -8,7 +8,7 @@
- +
diff --git a/web/templates/user/list_stats.html b/web/templates/user/list_stats.html index 0bb65770..d94d3845 100644 --- a/web/templates/user/list_stats.html +++ b/web/templates/user/list_stats.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/user/list_user.html b/web/templates/user/list_user.html index 00b3bd31..dd6283de 100644 --- a/web/templates/user/list_user.html +++ b/web/templates/user/list_user.html @@ -14,7 +14,7 @@
- +
diff --git a/web/templates/user/list_web.html b/web/templates/user/list_web.html index 1772ff2d..8cde7fe0 100644 --- a/web/templates/user/list_web.html +++ b/web/templates/user/list_web.html @@ -8,7 +8,7 @@
- +
From 4ebc40caf27d587b5249ff2c84a8e4bb84fd8d6b Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 24 Dec 2012 13:24:02 +0200 Subject: [PATCH 03/13] clickable naviagiton tabs --- web/templates/admin/panel.html | 160 +++++++++++------- web/templates/header.html | 294 +++++++++++++-------------------- web/templates/user/panel.html | 162 +++++++++++------- 3 files changed, 312 insertions(+), 304 deletions(-) diff --git a/web/templates/admin/panel.html b/web/templates/admin/panel.html index 4998543a..5d8484a7 100644 --- a/web/templates/admin/panel.html +++ b/web/templates/admin/panel.html @@ -7,70 +7,106 @@
- - - - -
- Domain -
- Account @@ -81,7 +71,9 @@
- disabled > +
- +
diff --git a/web/templates/admin/list_cron.html b/web/templates/admin/list_cron.html index fdd46346..f5fea0db 100644 --- a/web/templates/admin/list_cron.html +++ b/web/templates/admin/list_cron.html @@ -6,7 +6,7 @@
- +
diff --git a/web/templates/admin/list_db.html b/web/templates/admin/list_db.html index 92ad0e86..f85047b8 100644 --- a/web/templates/admin/list_db.html +++ b/web/templates/admin/list_db.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/admin/list_dns.html b/web/templates/admin/list_dns.html index 15ba608b..348068aa 100644 --- a/web/templates/admin/list_dns.html +++ b/web/templates/admin/list_dns.html @@ -6,7 +6,7 @@
- +
diff --git a/web/templates/admin/list_dns_rec.html b/web/templates/admin/list_dns_rec.html index 3abdfd3d..71b3a28b 100644 --- a/web/templates/admin/list_dns_rec.html +++ b/web/templates/admin/list_dns_rec.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/admin/list_ip.html b/web/templates/admin/list_ip.html index eb16e3ba..574b030a 100644 --- a/web/templates/admin/list_ip.html +++ b/web/templates/admin/list_ip.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/admin/list_log.html b/web/templates/admin/list_log.html index 020325c4..04b1959e 100644 --- a/web/templates/admin/list_log.html +++ b/web/templates/admin/list_log.html @@ -6,7 +6,7 @@
- +
diff --git a/web/templates/admin/list_mail.html b/web/templates/admin/list_mail.html index c725955c..abfdab33 100644 --- a/web/templates/admin/list_mail.html +++ b/web/templates/admin/list_mail.html @@ -6,7 +6,7 @@
- +
diff --git a/web/templates/admin/list_mail_acc.html b/web/templates/admin/list_mail_acc.html index 41784595..8fe8d50b 100644 --- a/web/templates/admin/list_mail_acc.html +++ b/web/templates/admin/list_mail_acc.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/admin/list_packages.html b/web/templates/admin/list_packages.html index 260a31f4..cef75f3d 100644 --- a/web/templates/admin/list_packages.html +++ b/web/templates/admin/list_packages.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/admin/list_rrd.html b/web/templates/admin/list_rrd.html index 4b180084..21986549 100644 --- a/web/templates/admin/list_rrd.html +++ b/web/templates/admin/list_rrd.html @@ -10,7 +10,7 @@
- +
diff --git a/web/templates/admin/list_search.html b/web/templates/admin/list_search.html index a3ab75ab..323cb01a 100644 --- a/web/templates/admin/list_search.html +++ b/web/templates/admin/list_search.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/admin/list_stats.html b/web/templates/admin/list_stats.html index ba662cd5..a46ba1b0 100644 --- a/web/templates/admin/list_stats.html +++ b/web/templates/admin/list_stats.html @@ -24,7 +24,7 @@
- +
diff --git a/web/templates/admin/list_user.html b/web/templates/admin/list_user.html index 092b7123..76f70ee2 100644 --- a/web/templates/admin/list_user.html +++ b/web/templates/admin/list_user.html @@ -13,7 +13,7 @@
- +
diff --git a/web/templates/admin/list_web.html b/web/templates/admin/list_web.html index 1e946bcf..30e9b979 100644 --- a/web/templates/admin/list_web.html +++ b/web/templates/admin/list_web.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/user/list_cron.html b/web/templates/user/list_cron.html index 079d2be8..ce74a5ae 100644 --- a/web/templates/user/list_cron.html +++ b/web/templates/user/list_cron.html @@ -6,7 +6,7 @@
- +
diff --git a/web/templates/user/list_db.html b/web/templates/user/list_db.html index 0ee65aa8..5db87d32 100644 --- a/web/templates/user/list_db.html +++ b/web/templates/user/list_db.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/user/list_dns.html b/web/templates/user/list_dns.html index d7cb09bd..363468a4 100644 --- a/web/templates/user/list_dns.html +++ b/web/templates/user/list_dns.html @@ -6,7 +6,7 @@
- +
diff --git a/web/templates/user/list_dns_rec.html b/web/templates/user/list_dns_rec.html index ee764ade..83ec89d6 100644 --- a/web/templates/user/list_dns_rec.html +++ b/web/templates/user/list_dns_rec.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/user/list_mail.html b/web/templates/user/list_mail.html index 9628f6db..30c8f71f 100644 --- a/web/templates/user/list_mail.html +++ b/web/templates/user/list_mail.html @@ -6,7 +6,7 @@
- +
diff --git a/web/templates/user/list_mail_acc.html b/web/templates/user/list_mail_acc.html index 8b700d8e..80166f24 100644 --- a/web/templates/user/list_mail_acc.html +++ b/web/templates/user/list_mail_acc.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/user/list_search.html b/web/templates/user/list_search.html index e4192bd1..c8a14049 100644 --- a/web/templates/user/list_search.html +++ b/web/templates/user/list_search.html @@ -7,7 +7,7 @@
- +
diff --git a/web/templates/user/list_stats.html b/web/templates/user/list_stats.html index d94d3845..193abb43 100644 --- a/web/templates/user/list_stats.html +++ b/web/templates/user/list_stats.html @@ -6,7 +6,7 @@
- +
diff --git a/web/templates/user/list_user.html b/web/templates/user/list_user.html index dd6283de..45e70e13 100644 --- a/web/templates/user/list_user.html +++ b/web/templates/user/list_user.html @@ -13,7 +13,7 @@
- +
diff --git a/web/templates/user/list_web.html b/web/templates/user/list_web.html index 8cde7fe0..37eca524 100644 --- a/web/templates/user/list_web.html +++ b/web/templates/user/list_web.html @@ -7,7 +7,7 @@
- +
From 8971e5e0b61eba123e462a1a7cbdacc7dfd87f0f Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 25 Dec 2012 13:39:19 +0200 Subject: [PATCH 06/13] submenu scroling visabilty imrpovement from dalaylama --- web/templates/header.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/templates/header.html b/web/templates/header.html index 70fe92d4..1d1447c3 100644 --- a/web/templates/header.html +++ b/web/templates/header.html @@ -153,6 +153,7 @@ margin-left: auto; margin-right: auto; width: 990px; + height: 54px; font-size: 10pt; text-align: left; vertical-align:top; @@ -609,6 +610,8 @@ position: fixed; border: none; top: -3px; + border-bottom: 2px solid #ebe9dc; + background-color: #fff; } *html .fixed{ From c47795863eeb8a2a417458757704c3b5e94a094a Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 25 Dec 2012 14:15:59 +0200 Subject: [PATCH 07/13] proper logdir for roundcube --- install/0.9.7/rhel/roundcube-main.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/0.9.7/rhel/roundcube-main.conf b/install/0.9.7/rhel/roundcube-main.conf index c5bf5b75..ebd34a60 100644 --- a/install/0.9.7/rhel/roundcube-main.conf +++ b/install/0.9.7/rhel/roundcube-main.conf @@ -100,7 +100,7 @@ $rcmail_config['skin_include_php'] = FALSE; $rcmail_config['temp_dir'] = '${_tmppath}'; // use this folder to store log files (must be writebale for apache user) -$rcmail_config['log_dir'] = '%{_logdir}/roundcubemail/'; +$rcmail_config['log_dir'] = '/var/log/roundcubemail/'; // session lifetime in minutes $rcmail_config['session_lifetime'] = 10; From 32bb9ffbccf229756bdf03ac7d2000f6e8232ab0 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 27 Dec 2012 17:25:27 +0200 Subject: [PATCH 08/13] $arch sensitive epel url --- install/vst-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/vst-install.sh b/install/vst-install.sh index aa27c159..f301bf6c 100644 --- a/install/vst-install.sh +++ b/install/vst-install.sh @@ -14,7 +14,7 @@ tools="screen mc libpng libjpeg curl curl libmcrypt libmcrypt mhash mhash freetype openssl flex libxml2 ImageMagick sqlite sqlite pcre pcre sudo bc mailx lsof ntp tar whois telnet rsync" -rpms="nginx httpd mod_ssl mod_ruid2 mod_extract_forwarded ftp +rpms="nginx httpd mod_ssl mod_ruid2 mod_extract_forwarded mod_fcgid ftp webalizer awstats mysql mysql-server php php-bcmath php-cli php-common php-gd php-imap php-mbstring php-mcrypt php-mysql php-pdo php-soap php-tidy php-xml php-xmlrpc phpMyAdmin exim dovecot clamd spamassassin roundcubemail @@ -198,11 +198,11 @@ fi # Install EPEL repo if [ ! -e '/etc/yum.repos.d/epel.repo' ]; then if [ "$release" -eq '5' ]; then - epel="5/i386/epel-release-5-4.noarch.rpm" + epel="5/$arch/epel-release-5-4.noarch.rpm" fi if [ "$release" -eq '6' ]; then - epel="6/i386/epel-release-6-7.noarch.rpm" + epel="6/$arch/epel-release-6-8.noarch.rpm" fi rpm -ivh http://dl.fedoraproject.org/pub/epel/$epel From eb40d641326e54793ee2637229a20006eed131f9 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 28 Dec 2012 11:39:01 +0200 Subject: [PATCH 09/13] password reset support for rouncube webmail --- bin/v-get-mail-account-value | 49 +++++++++++ bin/v-get-mail-domain-value | 47 +++++++++++ bin/v-search-domain-owner | 55 +++++++++++++ web/inc/main.php | 2 +- web/reset/mail/index.php | 154 +++++++++++++++++++++++++++++++++++ 5 files changed, 306 insertions(+), 1 deletion(-) create mode 100755 bin/v-get-mail-account-value create mode 100755 bin/v-get-mail-domain-value create mode 100755 bin/v-search-domain-owner create mode 100644 web/reset/mail/index.php diff --git a/bin/v-get-mail-account-value b/bin/v-get-mail-account-value new file mode 100755 index 00000000..067fcb6b --- /dev/null +++ b/bin/v-get-mail-account-value @@ -0,0 +1,49 @@ +#!/bin/bash +# info: get mail account value +# options: user domain account key +# +# The function for getting a certain mail account parameter. + + +#----------------------------------------------------------# +# Variable&Function # +#----------------------------------------------------------# + +# Argument defenition +user=$1 +domain=$(idn -t --quiet -u "$2" ) +domain_idn=$(idn -t --quiet -a "$domain") +account=$3 +key=$(echo "$4"| tr '[:lower:]' '[:upper:]'|sed -e "s/^/$/") + +# Includes +source $VESTA/func/main.sh + + +#----------------------------------------------------------# +# Verifications # +#----------------------------------------------------------# + +check_args '3' "$#" 'user domain key' +validate_format 'user' 'domain' +is_object_valid 'user' 'USER' "$user" +is_object_valid 'mail' 'DOMAIN' "$domain" +is_object_valid "mail/$domain" 'ACCOUNT' "$account" + + +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + +# Print +get_object_value "mail/$domain" 'ACCOUNT' "$account" "$key" + + +#----------------------------------------------------------# +# Vesta # +#----------------------------------------------------------# + +# Logging +log_event "$OK" "$EVENT" + +exit diff --git a/bin/v-get-mail-domain-value b/bin/v-get-mail-domain-value new file mode 100755 index 00000000..1fd54adc --- /dev/null +++ b/bin/v-get-mail-domain-value @@ -0,0 +1,47 @@ +#!/bin/bash +# info: get mail domain value +# options: user domain key +# +# The function for getting a certain mail domain parameter. + + +#----------------------------------------------------------# +# Variable&Function # +#----------------------------------------------------------# + +# Argument defenition +user=$1 +domain=$(idn -t --quiet -u "$2" ) +domain_idn=$(idn -t --quiet -a "$domain") +key=$(echo "$3"| tr '[:lower:]' '[:upper:]'|sed -e "s/^/$/") + +# Includes +source $VESTA/func/main.sh + + +#----------------------------------------------------------# +# Verifications # +#----------------------------------------------------------# + +check_args '3' "$#" 'user domain key' +validate_format 'user' 'domain' +is_object_valid 'user' 'USER' "$user" +is_object_valid 'mail' 'DOMAIN' "$domain" + + +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + +# Print +get_object_value 'mail' 'DOMAIN' "$domain" "$key" + + +#----------------------------------------------------------# +# Vesta # +#----------------------------------------------------------# + +# Logging +log_event "$OK" "$EVENT" + +exit diff --git a/bin/v-search-domain-owner b/bin/v-search-domain-owner new file mode 100755 index 00000000..c09a1c94 --- /dev/null +++ b/bin/v-search-domain-owner @@ -0,0 +1,55 @@ +#!/bin/bash +# info: search domain owner +# options: domain [type] +# +# The function that allows to find user objects. + + +#----------------------------------------------------------# +# Variable&Function # +#----------------------------------------------------------# + +# Argument defenition +domain=$(idn -t --quiet -u "$1" ) +type=${2-any} + +# Includes +source $VESTA/func/main.sh + + +#----------------------------------------------------------# +# Verifications # +#----------------------------------------------------------# + +check_args '1' "$#" 'domain [type]' + + +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + +# Define conf +case $type in + web) conf="$VESTA/data/users/*/web.conf" ;; + dns) conf="$VESTA/data/users/*/dns.conf" ;; + mail) conf="$VESTA/data/users/*/mail.conf" ;; + *) conf="$VESTA/data/users/*/*.conf" +esac + + +owner=$(grep "DOMAIN='$domain'" $conf | head -n 1 | cut -f7 -d '/') +if [ -z "$owner" ]; then + exit $E_NOTEXIST +fi + +echo $owner + + +#----------------------------------------------------------# +# Vesta # +#----------------------------------------------------------# + +# Logging +#log_event "$OK" "$EVENT" + +exit diff --git a/web/inc/main.php b/web/inc/main.php index 5df9e1bd..f48dc05b 100644 --- a/web/inc/main.php +++ b/web/inc/main.php @@ -1,6 +1,6 @@ 0; $i-=16) + { + if ($i > 16) + { + $ctx .= substr ($final,0,16); + } + else + { + $ctx .= substr ($final,0,$i); + } + } + $i = strlen ($pw); + + while ($i > 0) + { + if ($i & 1) $ctx .= chr (0); + else $ctx .= $pw[0]; + $i = $i >> 1; + } + $final = hex2bin (md5 ($ctx)); + + for ($i=0;$i<1000;$i++) + { + $ctx1 = ""; + if ($i & 1) + { + $ctx1 .= $pw; + } + else + { + $ctx1 .= substr ($final,0,16); + } + if ($i % 3) $ctx1 .= $salt; + if ($i % 7) $ctx1 .= $pw; + if ($i & 1) + { + $ctx1 .= substr ($final,0,16); + } + else + { + $ctx1 .= $pw; + } + $final = hex2bin (md5 ($ctx1)); + } + $passwd = ""; + $passwd .= to64 (((ord ($final[0]) << 16) | (ord ($final[6]) << 8) | (ord ($final[12]))), 4); + $passwd .= to64 (((ord ($final[1]) << 16) | (ord ($final[7]) << 8) | (ord ($final[13]))), 4); + $passwd .= to64 (((ord ($final[2]) << 16) | (ord ($final[8]) << 8) | (ord ($final[14]))), 4); + $passwd .= to64 (((ord ($final[3]) << 16) | (ord ($final[9]) << 8) | (ord ($final[15]))), 4); + $passwd .= to64 (((ord ($final[4]) << 16) | (ord ($final[10]) << 8) | (ord ($final[5]))), 4); + $passwd .= to64 (ord ($final[11]), 2); + return "$magic$salt\$$passwd"; +} + + +// +// sourceforge.net/projects/postfixadmin/ +// to64 +// + +function to64 ($v, $n) +{ + $ITOA64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + $ret = ""; + while (($n - 1) >= 0) + { + $n--; + $ret .= $ITOA64[$v & 0x3f]; + $v = $v >> 6; + } + return $ret; +} + + +// Check arguments +if ((!empty($_POST['email'])) && (!empty($_POST['password'])) && (!empty($_POST['new']))) { + list($v_account, $v_domain) = explode('@', $_POST['email']); + $v_domain = escapeshellarg($v_domain); + $v_account = escapeshellarg($v_account); + $password = $_POST['password']; + $new = escapeshellarg($_POST['new']); + + // Get domain owner + exec (VESTA_CMD."v-search-domain-owner ".$v_domain." 'mail'", $output, $return_var); + if ($return_var == 0) { + $v_user = $output[0]; + } + unset($output); + + // Get current md5 hash + if (!empty($v_user)) { + exec (VESTA_CMD."v-get-mail-account-value '".$v_user."' ".$v_domain." ".$v_account." 'md5'", $output, $return_var); + if ($return_var == 0) { + $v_hash = $output[0]; + } + } + unset($output); + + // Compare hashes + if (!empty($v_hash)) { + $salt = explode('$', $v_hash); + $n_hash = md5crypt($password, $salt[2]); + $n_hash = '{MD5}'.$n_hash; + + // Change password + if ( $v_hash == $n_hash ) { + exec (VESTA_CMD."v-change-mail-account-password '".$v_user."' ".$v_domain." ".$v_account." ".$new, $output, $return_var); + $fp = fopen('/tmp/vst.log', 'w'); + fwrite($fp, "Owner: ".$v_user."\n"); + fwrite($fp, "Hash: ".$v_hash."\n"); + fwrite($fp, "New: ".$n_hash."\n"); + fwrite($fp, "Salt : ".$salt[2]."\n"); + fwrite($fp, "Password: ".$password."\n"); + fwrite($fp, "Return: ".$return_var."\n"); + fclose($fp); + + if ($return_var == 0) { + echo "ok"; + exit; + } + } + } +} + +echo 'error'; + +exit; From e84f7e27093bb62cdcb21e0dac89ab7f7b8f49d3 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 28 Dec 2012 12:33:19 +0200 Subject: [PATCH 10/13] removed deugg logging --- web/reset/mail/index.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/web/reset/mail/index.php b/web/reset/mail/index.php index 8ac0d957..b49700c6 100644 --- a/web/reset/mail/index.php +++ b/web/reset/mail/index.php @@ -132,15 +132,6 @@ if ((!empty($_POST['email'])) && (!empty($_POST['password'])) && (!empty($_POST[ // Change password if ( $v_hash == $n_hash ) { exec (VESTA_CMD."v-change-mail-account-password '".$v_user."' ".$v_domain." ".$v_account." ".$new, $output, $return_var); - $fp = fopen('/tmp/vst.log', 'w'); - fwrite($fp, "Owner: ".$v_user."\n"); - fwrite($fp, "Hash: ".$v_hash."\n"); - fwrite($fp, "New: ".$n_hash."\n"); - fwrite($fp, "Salt : ".$salt[2]."\n"); - fwrite($fp, "Password: ".$password."\n"); - fwrite($fp, "Return: ".$return_var."\n"); - fclose($fp); - if ($return_var == 0) { echo "ok"; exit; From 44829483b6b2878bb5b7f10f60065f7cb0273def Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 28 Dec 2012 12:40:56 +0200 Subject: [PATCH 11/13] added roundcube driver for vesta reset api --- install/0.9.7/rhel/roundcube-driver.php | 54 +++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 install/0.9.7/rhel/roundcube-driver.php diff --git a/install/0.9.7/rhel/roundcube-driver.php b/install/0.9.7/rhel/roundcube-driver.php new file mode 100644 index 00000000..22877047 --- /dev/null +++ b/install/0.9.7/rhel/roundcube-driver.php @@ -0,0 +1,54 @@ + + */ + +class rcube_vesta_password +{ + function save($curpass, $passwd) + { + $rcmail = rcmail::get_instance(); + $vesta_host = $rcmail->config->get('password_vesta_host'); + + if (empty($vesta_host)) + { + $vesta_host = 'localhost'; + } + + $vesta_port = $rcmail->config->get('password_vesta_port'); + if (empty($vesta_port)) + { + $vesta_port = '8083'; + } + + $request = 'email='.$_SESSION['username'].'&'; + $request .= 'password='.$curpass.'&'; + $request .= 'new='.$passwd.'&'; + + + $context = stream_context_create(array( + 'http' => array( + 'method' => 'POST', + 'header' => 'Content-Type: application/x-www-form-urlencoded' . PHP_EOL, + 'content' => $request, + ), + )); + + $result = file_get_contents( + $file = "https://".$vesta_host.":".$vesta_port."/reset/mail/?", + $use_include_path = false, + $context); + + if ($result == 'ok'){ + return PASSWORD_SUCCESS; + } + else { + return PASSWORD_ERROR; + } + + } +} From 2b520fad1d06d64f68211575dbeba964aed9701d Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 28 Dec 2012 15:52:22 +0200 Subject: [PATCH 12/13] issue #57 upper case arguments to improve readability --- bin/v-add-cron-job | 4 ++-- bin/v-add-cron-report | 2 +- bin/v-add-database | 4 ++-- bin/v-add-database-server | 4 ++-- bin/v-add-dns-domain | 4 ++-- bin/v-add-dns-domain-record | 4 ++-- bin/v-add-dns-on-web-alias | 4 ++-- bin/v-add-mail-account | 4 ++-- bin/v-add-mail-account-alias | 4 ++-- bin/v-add-mail-account-autoreply | 4 ++-- bin/v-add-mail-account-forward | 4 ++-- bin/v-add-mail-domain | 4 ++-- bin/v-add-mail-domain-antispam | 4 ++-- bin/v-add-mail-domain-antivirus | 4 ++-- bin/v-add-mail-domain-catchall | 4 ++-- bin/v-add-mail-domain-dkim | 4 ++-- bin/v-add-sys-ip | 4 ++-- bin/v-add-user | 4 ++-- bin/v-add-user-backup | 4 ++-- bin/v-add-user-package | 4 ++-- bin/v-add-web-domain | 4 ++-- bin/v-add-web-domain-alias | 4 ++-- bin/v-add-web-domain-cgi | 4 ++-- bin/v-add-web-domain-elog | 4 ++-- bin/v-add-web-domain-ftp | 4 ++-- bin/v-add-web-domain-nginx | 4 ++-- bin/v-add-web-domain-ssl | 4 ++-- bin/v-add-web-domain-stats | 4 ++-- bin/v-add-web-domain-stats-user | 4 ++-- bin/v-backup-user | 4 ++-- bin/v-backup-users | 2 +- bin/v-change-cron-job | 4 ++-- bin/v-change-database-password | 4 ++-- bin/v-change-dns-domain-exp | 4 ++-- bin/v-change-dns-domain-ip | 4 ++-- bin/v-change-dns-domain-record | 4 ++-- bin/v-change-dns-domain-soa | 4 ++-- bin/v-change-dns-domain-tpl | 4 ++-- bin/v-change-dns-domain-ttl | 4 ++-- bin/v-change-mail-account-password | 4 ++-- bin/v-change-mail-account-quota | 4 ++-- bin/v-change-mail-domain-catchall | 4 ++-- bin/v-change-sys-config-value | 4 ++-- bin/v-change-sys-ip-name | 4 ++-- bin/v-change-sys-ip-owner | 4 ++-- bin/v-change-sys-ip-status | 4 ++-- bin/v-change-user-contact | 4 ++-- bin/v-change-user-name | 4 ++-- bin/v-change-user-ns | 4 ++-- bin/v-change-user-package | 4 ++-- bin/v-change-user-password | 4 ++-- bin/v-change-user-shell | 4 ++-- bin/v-change-user-template | 4 ++-- bin/v-change-web-domain-ftp | 4 ++-- bin/v-change-web-domain-ip | 4 ++-- bin/v-change-web-domain-nginx-tpl | 4 ++-- bin/v-change-web-domain-sslcert | 4 ++-- bin/v-change-web-domain-sslhome | 4 ++-- bin/v-change-web-domain-stats | 4 ++-- bin/v-change-web-domain-tpl | 4 ++-- bin/v-delete-cron-job | 4 ++-- bin/v-delete-cron-reports | 4 ++-- bin/v-delete-database | 4 ++-- bin/v-delete-database-server | 4 ++-- bin/v-delete-databases | 4 ++-- bin/v-delete-dns-domain | 4 ++-- bin/v-delete-dns-domain-record | 4 ++-- bin/v-delete-dns-domains | 4 ++-- bin/v-delete-dns-on-web-alias | 4 ++-- bin/v-delete-mail-account | 4 ++-- bin/v-delete-mail-account-alias | 4 ++-- bin/v-delete-mail-account-autoreply | 4 ++-- bin/v-delete-mail-account-forward | 4 ++-- bin/v-delete-mail-domain | 4 ++-- bin/v-delete-mail-domain-antispam | 4 ++-- bin/v-delete-mail-domain-antivirus | 4 ++-- bin/v-delete-mail-domain-catchall | 4 ++-- bin/v-delete-mail-domain-dkim | 4 ++-- bin/v-delete-mail-domains | 4 ++-- bin/v-delete-sys-ip | 4 ++-- bin/v-delete-user | 4 ++-- bin/v-delete-user-backup | 4 ++-- bin/v-delete-user-ips | 4 ++-- bin/v-delete-user-package | 4 ++-- bin/v-delete-web-domain | 4 ++-- bin/v-delete-web-domain-alias | 4 ++-- bin/v-delete-web-domain-cgi | 4 ++-- bin/v-delete-web-domain-elog | 4 ++-- bin/v-delete-web-domain-ftp | 4 ++-- bin/v-delete-web-domain-nginx | 4 ++-- bin/v-delete-web-domain-ssl | 4 ++-- bin/v-delete-web-domain-stats | 4 ++-- bin/v-delete-web-domain-stats-user | 4 ++-- bin/v-delete-web-domains | 4 ++-- bin/v-get-dns-domain-value | 4 ++-- bin/v-get-mail-account-value | 4 ++-- bin/v-get-mail-domain-value | 4 ++-- bin/v-get-user-value | 4 ++-- bin/v-get-web-domain-value | 4 ++-- bin/v-list-cron-job | 6 +++--- bin/v-list-cron-jobs | 6 +++--- bin/v-list-database | 6 +++--- bin/v-list-database-server | 6 +++--- bin/v-list-database-servers | 6 +++--- bin/v-list-database-types | 4 ++-- bin/v-list-databases | 6 +++--- bin/v-list-dns-domain | 6 +++--- bin/v-list-dns-domain-records | 6 +++--- bin/v-list-dns-domains | 6 +++--- bin/v-list-dns-template | 6 +++--- bin/v-list-dns-templates | 4 ++-- bin/v-list-mail-account | 6 +++--- bin/v-list-mail-account-autoreply | 6 +++--- bin/v-list-mail-accounts | 6 +++--- bin/v-list-mail-domain | 6 +++--- bin/v-list-mail-domain-dkim | 6 +++--- bin/v-list-mail-domains | 6 +++--- bin/v-list-sys-config | 2 +- bin/v-list-sys-interfaces | 4 ++-- bin/v-list-sys-ip | 6 +++--- bin/v-list-sys-ips | 4 ++-- bin/v-list-sys-rrd | 2 +- bin/v-list-sys-shells | 4 ++-- bin/v-list-sys-users | 4 ++-- bin/v-list-user | 4 ++-- bin/v-list-user-backups | 6 +++--- bin/v-list-user-ips | 6 +++--- bin/v-list-user-log | 6 +++--- bin/v-list-user-ns | 6 +++--- bin/v-list-user-package | 6 +++--- bin/v-list-user-packages | 4 ++-- bin/v-list-user-stats | 6 +++--- bin/v-list-users | 2 +- bin/v-list-users-stats | 6 +++--- bin/v-list-web-domain | 6 +++--- bin/v-list-web-domain-ssl | 6 +++--- bin/v-list-web-domains | 6 +++--- bin/v-list-web-domains-alias | 6 +++--- bin/v-list-web-domains-elog | 6 +++--- bin/v-list-web-domains-nginx | 6 +++--- bin/v-list-web-domains-ssl | 6 +++--- bin/v-list-web-domains-stats | 6 +++--- bin/v-list-web-stats | 4 ++-- bin/v-list-web-templates | 4 ++-- bin/v-list-web-templates-nginx | 4 ++-- bin/v-rebuild-cron-jobs | 4 ++-- bin/v-rebuild-databases | 4 ++-- bin/v-rebuild-dns-domains | 4 ++-- bin/v-rebuild-mail-domains | 4 ++-- bin/v-rebuild-user | 4 ++-- bin/v-rebuild-web-domains | 4 ++-- bin/v-restart-cron | 2 +- bin/v-restart-dns | 2 +- bin/v-restart-mail | 2 +- bin/v-restart-web | 2 +- bin/v-restore-user | 2 +- bin/v-search-domain-owner | 4 ++-- bin/v-search-object | 6 +++--- bin/v-search-user-object | 6 +++--- bin/v-suspend-cron-job | 4 ++-- bin/v-suspend-cron-jobs | 4 ++-- bin/v-suspend-database | 4 ++-- bin/v-suspend-database-server | 4 ++-- bin/v-suspend-databases | 4 ++-- bin/v-suspend-dns-domain | 4 ++-- bin/v-suspend-dns-domain-record | 4 ++-- bin/v-suspend-dns-domains | 4 ++-- bin/v-suspend-mail-account | 4 ++-- bin/v-suspend-mail-accounts | 4 ++-- bin/v-suspend-mail-domain | 4 ++-- bin/v-suspend-mail-domains | 4 ++-- bin/v-suspend-user | 4 ++-- bin/v-suspend-web-domain | 4 ++-- bin/v-suspend-web-domains | 4 ++-- bin/v-unsuspend-cron-job | 4 ++-- bin/v-unsuspend-cron-jobs | 4 ++-- bin/v-unsuspend-database | 4 ++-- bin/v-unsuspend-database-server | 4 ++-- bin/v-unsuspend-databases | 4 ++-- bin/v-unsuspend-dns-domain | 4 ++-- bin/v-unsuspend-dns-domain-record | 4 ++-- bin/v-unsuspend-dns-domains | 4 ++-- bin/v-unsuspend-mail-account | 4 ++-- bin/v-unsuspend-mail-accounts | 4 ++-- bin/v-unsuspend-mail-domain | 4 ++-- bin/v-unsuspend-mail-domains | 4 ++-- bin/v-unsuspend-user | 4 ++-- bin/v-unsuspend-web-domain | 4 ++-- bin/v-unsuspend-web-domains | 4 ++-- bin/v-update-database-disk | 4 ++-- bin/v-update-databases-disk | 4 ++-- bin/v-update-mail-domain-disk | 4 ++-- bin/v-update-mail-domains-disk | 4 ++-- bin/v-update-sys-ip | 4 ++-- bin/v-update-sys-queue | 6 +++--- bin/v-update-sys-rrd | 2 +- bin/v-update-sys-rrd-ftp | 2 +- bin/v-update-sys-rrd-httpd | 2 +- bin/v-update-sys-rrd-la | 2 +- bin/v-update-sys-rrd-mem | 2 +- bin/v-update-sys-rrd-mysql | 2 +- bin/v-update-sys-rrd-net | 2 +- bin/v-update-sys-rrd-nginx | 2 +- bin/v-update-sys-rrd-pgsql | 2 +- bin/v-update-sys-rrd-ssh | 2 +- bin/v-update-sys-vesta | 4 ++-- bin/v-update-user-backups | 4 ++-- bin/v-update-user-counters | 4 ++-- bin/v-update-user-disk | 4 ++-- bin/v-update-user-package | 4 ++-- bin/v-update-user-stats | 4 ++-- bin/v-update-web-domain-disk | 4 ++-- bin/v-update-web-domain-stat | 4 ++-- bin/v-update-web-domain-traff | 4 ++-- bin/v-update-web-domains-disk | 4 ++-- bin/v-update-web-domains-stat | 4 ++-- bin/v-update-web-domains-traff | 4 ++-- 217 files changed, 449 insertions(+), 449 deletions(-) diff --git a/bin/v-add-cron-job b/bin/v-add-cron-job index fd94c5b8..08784e1f 100755 --- a/bin/v-add-cron-job +++ b/bin/v-add-cron-job @@ -1,6 +1,6 @@ #!/bin/bash # info: add cron job -# options: user min hour day month wday command [job] +# options: USER MIN HOUR DAY MONTH WDAY COMMAND [JOB] # # The function adds a job to cron daemon. When executing commands, any output # is mailed to user's email if parameter REPORTS is set to 'yes'. @@ -32,7 +32,7 @@ A7="$command" # Verifications # #----------------------------------------------------------# -check_args '7' "$#" 'user min hour day month wday command [job]' +check_args '7' "$#" 'USER MIN HOUR DAY MONTH WDAY COMMAND [JOB]' validate_format 'user' 'min' 'hour' 'day' 'month' 'wday' 'command' is_system_enabled $CRON_SYSTEM is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-cron-report b/bin/v-add-cron-report index fa1c0edc..fd969bd6 100755 --- a/bin/v-add-cron-report +++ b/bin/v-add-cron-report @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$CRON_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-database b/bin/v-add-database index df474d4a..923a48a5 100755 --- a/bin/v-add-database +++ b/bin/v-add-database @@ -1,6 +1,6 @@ #!/bin/bash # info: add database -# options: user database dbuser dbpass type [host] [charset] +# options: USER DATABASE DBUSER DBPASS TYPE [HOST] [CHARSET] # # The function creates the database concatenating username and user_db. # Supported yypes of databases you can get using v-list-sys-config script. @@ -40,7 +40,7 @@ EVENT="$EVENT A4='$A4' A5='$A5' A6='$A6' A7='$A7' A8='$A8' A9='$A9'" # Verifications # #----------------------------------------------------------# -check_args '5' "$#" 'user database dbuser dbpass type [host] [charset]' +check_args '5' "$#" 'USER DATABASE DBUSER DBPASS TYPE [HOST] [CHARSET]' validate_format 'user' 'database' 'dbuser' 'dbpass' 'charset' is_system_enabled "$DB_SYSTEM" is_type_valid "$DB_SYSTEM" "$type" diff --git a/bin/v-add-database-server b/bin/v-add-database-server index 91d263ba..48007097 100755 --- a/bin/v-add-database-server +++ b/bin/v-add-database-server @@ -1,6 +1,6 @@ #!/bin/bash # info: add new database server -# options: type host port dbuser dbpass [max_db] [charsets] [template] +# options: TYPE HOST PORT DBUSER DBPASS [MAX_DB] [CHARSETS] [TEMPLATE] # # The function add new database server to the server pool. It supports local # and remote database servers, which is useful for clusters. By adding a host @@ -36,7 +36,7 @@ max_db=${6-500} # Verifications # #----------------------------------------------------------# -args_usage='type host port dbuser dbpass [max_db] [charsets] [tpl]' +args_usage='TYPE HOST PORT DBUSER DBPASS [MAX_DB] [CHARSETS] [TPL]' check_args '5' "$#" "$args_usage" validate_format 'host' 'port' 'dbuser' 'dbpass' 'max_db' 'charsets' 'template' is_system_enabled "$DB_SYSTEM" diff --git a/bin/v-add-dns-domain b/bin/v-add-dns-domain index 92b65153..060a7103 100755 --- a/bin/v-add-dns-domain +++ b/bin/v-add-dns-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: add dns domain -# options: user domain ip [template] [ns1] [ns2] [ns3] [ns4] [restart] +# options: USER DOMAIN IP [TEMPLATE] [NS1] [NS2] [NS3] [NS4] [RESTART] # # The function adds DNS zone with records defined in the template. If the exp # argument isn't stated, the expiration date value will be set to next year. @@ -37,7 +37,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain ip [template] [ns1] [ns2] [ns3] [ns4]' +check_args '3' "$#" 'USER DOMAIN IP [TEMPLATE] [NS1] [NS2] [NS3] [NS4]' validate_format 'user' 'domain' 'ip' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-dns-domain-record b/bin/v-add-dns-domain-record index ca9c6247..12a64c3a 100755 --- a/bin/v-add-dns-domain-record +++ b/bin/v-add-dns-domain-record @@ -1,6 +1,6 @@ #!/bin/bash # info: add dns domain record -# options: user domain record type value [priority] [id] [restart] +# options: USER DOMAIN RECORD TYPE VALUE [PRIORITY] [ID] [RESTART] # # The call is used for adding new DNS record. Complex records of TXT, MX and # SRV types can be used by a filling in the 'value' argument. The function also @@ -36,7 +36,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '5' "$#" 'user domain record type value [priority] [id] [restart]' +check_args '5' "$#" 'USER DOMAIN RECORD TYPE VALUE [PRIORITY] [ID] [RESTART]' validate_format 'user' 'domain' 'record' 'rtype' 'dvalue' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-dns-on-web-alias b/bin/v-add-dns-on-web-alias index dc00e3a8..7b9e2f7d 100755 --- a/bin/v-add-dns-on-web-alias +++ b/bin/v-add-dns-on-web-alias @@ -1,6 +1,6 @@ #!/bin/bash # info: add dns domain or dns record based on web domain alias restart -# options: user domain +# options: USER DOMAIN # # The function adds dns domain or dns record based on web domain alias. @@ -29,7 +29,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain alias' +check_args '3' "$#" 'USER DOMAIN ALIAS' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_system_enabled "$DNS_SYSTEM" diff --git a/bin/v-add-mail-account b/bin/v-add-mail-account index 8a16cbfe..67020b5e 100755 --- a/bin/v-add-mail-account +++ b/bin/v-add-mail-account @@ -1,6 +1,6 @@ #!/bin/bash # info: add mail domain account -# options: user domain account password [quota] +# options: USER DOMAIN ACCOUNT PASSWORD [QUOTA] # # The function add new email account. @@ -33,7 +33,7 @@ EVENT="$EVENT A4='$A4' A5='$A5' A6='$A6' A7='$A7' A8='$A8' A9='$A9'" # Verifications # #----------------------------------------------------------# -check_args '4' "$#" 'user domain account password [quota]' +check_args '4' "$#" 'USER DOMAIN ACCOUNT PASSWORD [QUOTA]' validate_format 'user' 'domain' 'account' 'password' 'quota' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-mail-account-alias b/bin/v-add-mail-account-alias index 86552441..cff53695 100755 --- a/bin/v-add-mail-account-alias +++ b/bin/v-add-mail-account-alias @@ -1,6 +1,6 @@ #!/bin/bash # info: add mail account alias aka nickname -# options: user domain account alias +# options: USER DOMAIN ACCOUNT ALIAS # # The function add new email alias. @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '4' "$#" 'user domain account alias' +check_args '4' "$#" 'USER DOMAIN ACCOUNT ALIAS' validate_format 'user' 'domain' 'account' 'malias' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-mail-account-autoreply b/bin/v-add-mail-account-autoreply index bd1f86f1..13f1e9f5 100755 --- a/bin/v-add-mail-account-autoreply +++ b/bin/v-add-mail-account-autoreply @@ -1,6 +1,6 @@ #!/bin/bash # info: add mail account autoreply message -# options: user domain account message +# options: USER DOMAIN ACCOUNT MESSAGE # # The function add new email account. @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '4' "$#" 'user domain account message' +check_args '4' "$#" 'USER DOMAIN ACCOUNT MESSAGE' validate_format 'user' 'domain' 'account' 'autoreply' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-mail-account-forward b/bin/v-add-mail-account-forward index 6288098c..8e6e8136 100755 --- a/bin/v-add-mail-account-forward +++ b/bin/v-add-mail-account-forward @@ -1,6 +1,6 @@ #!/bin/bash # info: add mail account forward address -# options: user domain account forward +# options: USER DOMAIN ACCOUNT FORWARD # # The function add new email account. @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '4' "$#" 'user domain account forward' +check_args '4' "$#" 'USER DOMAIN ACCOUNT FORWARD' validate_format 'user' 'domain' 'account' 'forward' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-mail-domain b/bin/v-add-mail-domain index b8f5666d..9e8b799e 100755 --- a/bin/v-add-mail-domain +++ b/bin/v-add-mail-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: add mail domain -# options: user domain [antispam] [antivirus] [dkim] [dkim_size] +# options: USER DOMAIN [ANTISPAM] [ANTIVIRUS] [DKIM] [DKIM_SIZE] # # The function adds MAIL domain. @@ -30,7 +30,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [antispam] [antivirus] [dkim] [dkim_size]' +check_args '2' "$#" 'USER DOMAIN [ANTISPAM] [ANTIVIRUS] [DKIM] [DKIM_SIZE]' validate_format 'user' 'domain' 'antispam' 'antivirus' 'dkim' 'dkim_size' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-mail-domain-antispam b/bin/v-add-mail-domain-antispam index 58585fc6..c6035c41 100755 --- a/bin/v-add-mail-domain-antispam +++ b/bin/v-add-mail-domain-antispam @@ -1,6 +1,6 @@ #!/bin/bash # info: add mail domain antispam support -# options: user domain +# options: USER DOMAIN # # The function enables spamassasin for incomming emails. @@ -25,7 +25,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-mail-domain-antivirus b/bin/v-add-mail-domain-antivirus index d2f689b9..7da3ea0f 100755 --- a/bin/v-add-mail-domain-antivirus +++ b/bin/v-add-mail-domain-antivirus @@ -1,6 +1,6 @@ #!/bin/bash # info: add mail domain antivirus support -# options: user domain +# options: USER DOMAIN # # The function enables clamav scan for incomming emails. @@ -25,7 +25,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-mail-domain-catchall b/bin/v-add-mail-domain-catchall index ddea0d88..fde47507 100755 --- a/bin/v-add-mail-domain-catchall +++ b/bin/v-add-mail-domain-catchall @@ -1,6 +1,6 @@ #!/bin/bash # info: add mail domain catchall account -# options: user domain email +# options: USER DOMAIN EMAIL # # The function enables catchall account for incomming emails. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain email' +check_args '3' "$#" 'USER DOMAIN EMAIL' validate_format 'user' 'domain' 'email' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-mail-domain-dkim b/bin/v-add-mail-domain-dkim index e5be80f0..b94f4f68 100755 --- a/bin/v-add-mail-domain-dkim +++ b/bin/v-add-mail-domain-dkim @@ -1,6 +1,6 @@ #!/bin/bash # info: add mail domain dkim support -# options: user domain [dkim_size] +# options: USER DOMAIN [DKIM_SIZE] # # The function adds DKIM signature to outgoing domain emails. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [dkim_size]' +check_args '2' "$#" 'USER DOMAIN [DKIM_SIZE]' validate_format 'user' 'domain' 'dkim_size' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-sys-ip b/bin/v-add-sys-ip index 2e8b3c3c..90315382 100755 --- a/bin/v-add-sys-ip +++ b/bin/v-add-sys-ip @@ -1,6 +1,6 @@ #!/bin/bash # info: add system ip address -# options: ip mask [interface] [user] [ip_status] [ip_name] +# options: IP MASK [INTERFACE] [USER] [IP_STATUS] [IP_NAME] # # The function adds ip address into a system. It also creates rc scripts. You # can specify ip name which will be used as root domain for temporary aliases. @@ -33,7 +33,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'ip mask [interface] [user] [ip_status] [ip_name]' +check_args '2' "$#" 'IP MASK [INTERFACE] [USER] [IP_STATUS] [IP_NAME]' validate_format 'ip' 'mask' 'interface' 'user' 'ip_status' is_ip_free is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-user b/bin/v-add-user index 31f79284..bc3cde65 100755 --- a/bin/v-add-user +++ b/bin/v-add-user @@ -1,6 +1,6 @@ #!/bin/bash # info: add system user -# options: user password email [package] [fname] [lname] +# options: USER PASSWORD EMAIL [PACKAGE] [FNAME] [LNAME] # # The function creates new user account. @@ -40,7 +40,7 @@ is_user_free() { # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user password email [package] [fname] [lname]' +check_args '3' "$#" 'USER PASSWORD EMAIL [PACKAGE] [FNAME] [LNAME]' validate_format 'user' 'password' 'email' 'package' if [ ! -z "$fname" ]; then validate_format 'fname' 'lname' diff --git a/bin/v-add-user-backup b/bin/v-add-user-backup index 9a388926..2e8ead08 100755 --- a/bin/v-add-user-backup +++ b/bin/v-add-user-backup @@ -1,6 +1,6 @@ #!/bin/bash # info: schedule user backup creation -# options: user +# options: USER # # The function for scheduling user backup creation. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$BACKUP_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-user-package b/bin/v-add-user-package index 8d3d8626..a2bd2467 100755 --- a/bin/v-add-user-package +++ b/bin/v-add-user-package @@ -1,6 +1,6 @@ #!/bin/bash # info: adding user package -# options: pkg_dir package [rewrite] +# options: PKG_DIR PACKAGE [REWRITE] # # The function adds new user package to the system. @@ -47,7 +47,7 @@ is_package_consistent() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'pkg_dir package' 'rewrite' +check_args '2' "$#" 'PKG_DIR PACKAGE' 'rewrite' validate_format 'pkg_dir' 'package' if [ "$rewrite" != 'yes' ]; then is_package_new diff --git a/bin/v-add-web-domain b/bin/v-add-web-domain index 908d1ebd..47397899 100755 --- a/bin/v-add-web-domain +++ b/bin/v-add-web-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: add web domain -# options: user domain ip [template] [restart] +# options: USER DOMAIN IP [TEMPLATE] [RESTART] # # The function adds virtual host to a server. In cases when a template is # undefined in the script, the template "default" will be used. The alias of @@ -35,7 +35,7 @@ source $VESTA/func/ip.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain ip [template] [restart]' +check_args '3' "$#" 'USER DOMAIN IP [TEMPLATE] [RESTART]' validate_format 'user' 'domain' 'ip' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-web-domain-alias b/bin/v-add-web-domain-alias index 76f615eb..a14ac8ae 100755 --- a/bin/v-add-web-domain-alias +++ b/bin/v-add-web-domain-alias @@ -1,6 +1,6 @@ #!/bin/bash # info: add web domain alias -# options: user domain alias [restart] +# options: USER DOMAIN ALIAS [RESTART] # # The call is intended for adding aliases to a domain (it is also called # "domain parking"). The function supports wildcards *.domain.tpl. @@ -31,7 +31,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain dom_alias [restart]' +check_args '3' "$#" 'USER DOMAIN DOM_ALIAS [RESTART]' validate_format 'user' 'domain' 'dom_alias' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-web-domain-cgi b/bin/v-add-web-domain-cgi index 02c85133..fc2a9993 100755 --- a/bin/v-add-web-domain-cgi +++ b/bin/v-add-web-domain-cgi @@ -1,6 +1,6 @@ #!/bin/bash # info: add cgi support for domain -# options: user domain +# options: USER DOMAIN # # The function switches on cgi support by adding +ExecCGI directive into # webserver configuration file. The use of this function is provided for @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-web-domain-elog b/bin/v-add-web-domain-elog index e92dbdb8..31859b5b 100755 --- a/bin/v-add-web-domain-elog +++ b/bin/v-add-web-domain-elog @@ -1,6 +1,6 @@ #!/bin/bash # info: add error logging for domain -# options: user domain [restart] +# options: USER DOMAIN [RESTART] # # The function enables a separate ErrorLog file for a domain, accessible for # reading by users. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [restart]' +check_args '2' "$#" 'USER DOMAIN [RESTART]' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-web-domain-ftp b/bin/v-add-web-domain-ftp index dae270be..52e15038 100755 --- a/bin/v-add-web-domain-ftp +++ b/bin/v-add-web-domain-ftp @@ -1,6 +1,6 @@ #!/bin/bash # info: add ftp account for web domain. -# options: user domain ftp_user ftp_password +# options: USER DOMAIN FTP_USER FTP_PASSWORD # # The function creates addutional ftp account for web domain. @@ -30,7 +30,7 @@ EVENT="$EVENT A4='$A4' A5='$A5' A6='$A6' A7='$A7' A8='$A8' A9='$A9'" # Verifications # #----------------------------------------------------------# -check_args '4' "$#" 'user domain ftp_user ftp_password' +check_args '4' "$#" 'USER DOMAIN FTP_USER FTP_PASSWORD' validate_format 'user' 'domain' 'ftp_user' 'ftp_password' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-web-domain-nginx b/bin/v-add-web-domain-nginx index 701f19ef..f1509862 100755 --- a/bin/v-add-web-domain-nginx +++ b/bin/v-add-web-domain-nginx @@ -1,6 +1,6 @@ #!/bin/bash # info: add webdomain nginx support -# options: user domain [template] [extentions] [restart] +# options: USER DOMAIN [TEMPLATE] [EXTENTIONS] [RESTART] # # The function enables nginx support for a domain. It can significantly improve # website speed. @@ -30,7 +30,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [template] [extentions] [restart]' +check_args '2' "$#" 'USER DOMAIN [TEMPLATE] [EXTENTIONS] [RESTART]' validate_format 'user' 'domain' 'extentions' is_system_enabled "$PROXY_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-web-domain-ssl b/bin/v-add-web-domain-ssl index db7705bd..46245734 100755 --- a/bin/v-add-web-domain-ssl +++ b/bin/v-add-web-domain-ssl @@ -1,6 +1,6 @@ #!/bin/bash # info: adding ssl for domain -# options: user domain ssl_dir [ssl_home] [restart] +# options: USER DOMAIN SSL_DIR [SSL_HOME] [RESTART] # # The function turns on SSL support for a domain. Parameter ssl_dir is a path # to directory where 2 or 3 ssl files can be found. Certificate file @@ -33,7 +33,7 @@ source $VESTA/func/ip.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain ssl_dir [ssl_home] [restart]' +check_args '3' "$#" 'USER DOMAIN SSL_DIR [SSL_HOME] [RESTART]' validate_format 'user' 'domain' 'ssl_dir' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-add-web-domain-stats b/bin/v-add-web-domain-stats index 90592b32..a669f856 100755 --- a/bin/v-add-web-domain-stats +++ b/bin/v-add-web-domain-stats @@ -1,6 +1,6 @@ #!/bin/bash # info: add log analyzer to generate domain statitics -# options: user domain type +# options: USER DOMAIN TYPE # # The call is used for enabling log analyzer system to a domain. At this time # two types of these system is supported - awstats and webalizer. For viewing @@ -29,7 +29,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain type' +check_args '3' "$#" 'USER DOMAIN TYPE' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_type_valid "$STATS_SYSTEM" "$type" diff --git a/bin/v-add-web-domain-stats-user b/bin/v-add-web-domain-stats-user index d4d2d0b4..fb670645 100755 --- a/bin/v-add-web-domain-stats-user +++ b/bin/v-add-web-domain-stats-user @@ -1,6 +1,6 @@ #!/bin/bash # info: add password protection to web domain statistics -# options: user domain stats_user stats_password +# options: USER DOMAIN STATS_USER STATS_PASSWORD # # The call is used for securing the web statistics page. @@ -30,7 +30,7 @@ EVENT="$EVENT A4='$A4' A5='$A5' A6='$A6' A7='$A7' A8='$A8' A9='$A9'" # Verifications # #----------------------------------------------------------# -check_args '4' "$#" 'user domain stats_user stats_pass' +check_args '4' "$#" 'USER DOMAIN STATS_USER STATS_PASS' validate_format 'user' 'domain' 'stats_user' 'stats_pass' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-backup-user b/bin/v-backup-user index 2e6518e4..38908dd1 100755 --- a/bin/v-backup-user +++ b/bin/v-backup-user @@ -1,6 +1,6 @@ #!/bin/bash # info: backup system user with all its objects -# options: user +# options: USER # # The call is used for backing up user with all its domains and databases. @@ -23,7 +23,7 @@ source $VESTA/func/db.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$BACKUP_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-backup-users b/bin/v-backup-users index fd33721b..24b9819e 100755 --- a/bin/v-backup-users +++ b/bin/v-backup-users @@ -1,6 +1,6 @@ #!/bin/bash # info: backup all users -# options: none +# options: NONE # # The function backups all system users. diff --git a/bin/v-change-cron-job b/bin/v-change-cron-job index 00d300de..1a930e50 100755 --- a/bin/v-change-cron-job +++ b/bin/v-change-cron-job @@ -1,6 +1,6 @@ #!/bin/bash # info: change cron job -# options: user job min hour day month wday command +# options: USER JOB MIN HOUR DAY MONTH WDAY COMMAND # # The function is used for changing existing job. It fully replace job # parameters with new one but with same id. @@ -29,7 +29,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '7' "$#" 'user job min hour day month wday command' +check_args '7' "$#" 'USER JOB MIN HOUR DAY MONTH WDAY COMMAND' validate_format 'user' 'job' 'min' 'hour' 'day' 'month' 'wday' 'command' is_system_enabled $CRON_SYSTEM is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-database-password b/bin/v-change-database-password index a4ffdbc1..ee283675 100755 --- a/bin/v-change-database-password +++ b/bin/v-change-database-password @@ -1,6 +1,6 @@ #!/bin/bash # info: change database password -# options: user database dbpass +# options: USER DATABASE DBPASS # # The function for changing database user password to a database. It uses the # full name of database as argument. @@ -30,7 +30,7 @@ EVENT="$EVENT A4='$A4' A5='$A5' A6='$A6' A7='$A7' A8='$A8' A9='$A9'" # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user database dbpass' +check_args '3' "$#" 'USER DATABASE DBPASS' validate_format 'user' 'database' 'dbpass' is_system_enabled "$DB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-dns-domain-exp b/bin/v-change-dns-domain-exp index 8ee2c0ae..e491893b 100755 --- a/bin/v-change-dns-domain-exp +++ b/bin/v-change-dns-domain-exp @@ -1,6 +1,6 @@ #!/bin/bash # info: change dns domain expiriation date -# options: user domain exp +# options: USER DOMAIN EXP # # The function of changing the term of expiration domain's registration. The # serial number will be refreshed automatically during update. @@ -25,7 +25,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain exp' +check_args '3' "$#" 'USER DOMAIN EXP' validate_format 'user' 'domain' 'exp' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-dns-domain-ip b/bin/v-change-dns-domain-ip index ce671b04..9a3fb050 100755 --- a/bin/v-change-dns-domain-ip +++ b/bin/v-change-dns-domain-ip @@ -1,6 +1,6 @@ #!/bin/bash # info: change dns domain ip address -# options: user domain ip +# options: USER DOMAIN IP # # The function for changing the main ip of DNS zone. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain ip' +check_args '3' "$#" 'USER DOMAIN IP' validate_format 'user' 'domain' 'ip' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-dns-domain-record b/bin/v-change-dns-domain-record index a694b9cb..d9a4310f 100755 --- a/bin/v-change-dns-domain-record +++ b/bin/v-change-dns-domain-record @@ -1,6 +1,6 @@ #!/bin/bash # info: change dns domain record -# options: user domain id value [priority] +# options: USER DOMAIN ID VALUE [PRIORITY] # # The function for changing DNS record. @@ -29,7 +29,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '4' "$#" 'user domain id value [priority]' +check_args '4' "$#" 'USER DOMAIN ID VALUE [PRIORITY]' validate_format 'user' 'domain' 'id' 'dvalue' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-dns-domain-soa b/bin/v-change-dns-domain-soa index 867fd32e..f12af4e7 100755 --- a/bin/v-change-dns-domain-soa +++ b/bin/v-change-dns-domain-soa @@ -1,6 +1,6 @@ #!/bin/bash # info: change dns domain soa record -# options: user domain soa +# options: USER DOMAIN SOA # # The function for changing SOA record. This type of records can not be # modified by v-change-dns-domain-record call. @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain soa' +check_args '3' "$#" 'USER DOMAIN SOA' validate_format 'user' 'domain' 'soa' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-dns-domain-tpl b/bin/v-change-dns-domain-tpl index 00d3752b..0d88be40 100755 --- a/bin/v-change-dns-domain-tpl +++ b/bin/v-change-dns-domain-tpl @@ -1,6 +1,6 @@ #!/bin/bash # info: change dns domain template -# options: user domain +# options: USER DOMAIN # # The function for changing the template of records. By updating old records # will be removed and new records will be generated in accordance with @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain template' +check_args '3' "$#" 'USER DOMAIN TEMPLATE' validate_format 'user' 'domain' 'template' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-dns-domain-ttl b/bin/v-change-dns-domain-ttl index f99e9492..1112aa9b 100755 --- a/bin/v-change-dns-domain-ttl +++ b/bin/v-change-dns-domain-ttl @@ -1,6 +1,6 @@ #!/bin/bash # info: change dns domain ttl -# options: user domain ttl +# options: USER DOMAIN TTL # # The function for chaning the time to live TTL parameter for all records. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain ttl' +check_args '3' "$#" 'USER DOMAIN TTL' validate_format 'user' 'domain' 'ttl' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-mail-account-password b/bin/v-change-mail-account-password index ec071057..0c476374 100755 --- a/bin/v-change-mail-account-password +++ b/bin/v-change-mail-account-password @@ -1,6 +1,6 @@ #!/bin/bash # info: change mail account password -# options: user domain account password +# options: USER DOMAIN ACCOUNT PASSWORD # # The function changes email account password. @@ -32,7 +32,7 @@ EVENT="$EVENT A4='$A4' A5='$A5' A6='$A6' A7='$A7' A8='$A8' A9='$A9'" # Verifications # #----------------------------------------------------------# -check_args '4' "$#" 'user domain account password' +check_args '4' "$#" 'USER DOMAIN ACCOUNT PASSWORD' validate_format 'user' 'domain' 'account' 'password' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-mail-account-quota b/bin/v-change-mail-account-quota index 005c7e28..73135a36 100755 --- a/bin/v-change-mail-account-quota +++ b/bin/v-change-mail-account-quota @@ -1,6 +1,6 @@ #!/bin/bash # info: change mail account quota -# options: user domain account quota +# options: USER DOMAIN ACCOUNT QUOTA # # The function changes email account disk quota. @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '4' "$#" 'user domain account quota' +check_args '4' "$#" 'USER DOMAIN ACCOUNT QUOTA' validate_format 'user' 'domain' 'account' 'quota' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-mail-domain-catchall b/bin/v-change-mail-domain-catchall index 2f50baa9..359f40b7 100755 --- a/bin/v-change-mail-domain-catchall +++ b/bin/v-change-mail-domain-catchall @@ -1,6 +1,6 @@ #!/bin/bash # info: change mail domain catchall email -# options: user domain email +# options: USER DOMAIN EMAIL # # The function changes mail domain cathcall. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain email' +check_args '3' "$#" 'USER DOMAIN EMAIL' validate_format 'user' 'domain' 'email' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-sys-config-value b/bin/v-change-sys-config-value index e2fca61e..d81d7735 100755 --- a/bin/v-change-sys-config-value +++ b/bin/v-change-sys-config-value @@ -1,6 +1,6 @@ #!/bin/bash # info: change sysconfig value -# options: key value +# options: KEY VALUE # # The function is for changing main config settings such as COMPANY_NAME or # COMPANY_EMAIL and so on. @@ -23,7 +23,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'key value' +check_args '2' "$#" 'KEY VALUE' validate_format 'key' check_ckey=$(grep "^$key='" $VESTA/conf/vesta.conf) if [ -z "$check_ckey" ]; then diff --git a/bin/v-change-sys-ip-name b/bin/v-change-sys-ip-name index dfb6b954..eae3c7ee 100755 --- a/bin/v-change-sys-ip-name +++ b/bin/v-change-sys-ip-name @@ -1,6 +1,6 @@ #!/bin/bash # info: change ip name -# options: ip name +# options: IP NAME # # The function for changing dns domain associated with ip. @@ -23,7 +23,7 @@ source $VESTA/func/ip.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'ip ip_name' +check_args '2' "$#" 'IP IP_NAME' validate_format 'ip' 'ip_name' is_ip_valid diff --git a/bin/v-change-sys-ip-owner b/bin/v-change-sys-ip-owner index 105c4ad2..ed8e447e 100755 --- a/bin/v-change-sys-ip-owner +++ b/bin/v-change-sys-ip-owner @@ -1,6 +1,6 @@ #!/bin/bash # info: change ip owner -# options: ip user +# options: IP USER # # The function of changing ip address ownership. @@ -22,7 +22,7 @@ source $VESTA/func/ip.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'ip user' +check_args '2' "$#" 'IP USER' validate_format 'ip' 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" diff --git a/bin/v-change-sys-ip-status b/bin/v-change-sys-ip-status index e498895f..761d6133 100755 --- a/bin/v-change-sys-ip-status +++ b/bin/v-change-sys-ip-status @@ -1,6 +1,6 @@ #!/bin/bash # info: change ip status -# options: ip ip_status +# options: IP IP_STATUS # # The function of changing an ip address's status. @@ -22,7 +22,7 @@ source $VESTA/func/ip.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'ip ip_status' +check_args '2' "$#" 'IP IP_STATUS' validate_format 'ip' 'ip_status' is_ip_valid if [ "$ip_status" = "$(get_ip_value '$STATUS')" ]; then diff --git a/bin/v-change-user-contact b/bin/v-change-user-contact index a0883e64..7f21aece 100755 --- a/bin/v-change-user-contact +++ b/bin/v-change-user-contact @@ -1,6 +1,6 @@ #!/bin/bash # info: change user contact email -# options: user email +# options: USER EMAIL # # The function for changing of e-mail associated with a certain user. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user email' +check_args '2' "$#" 'USER EMAIL' validate_format 'user' 'email' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" diff --git a/bin/v-change-user-name b/bin/v-change-user-name index 833a59fd..26e90872 100755 --- a/bin/v-change-user-name +++ b/bin/v-change-user-name @@ -1,6 +1,6 @@ #!/bin/bash # info: change user full name -# options: user fname lname +# options: USER FNAME LNAME # # The function allow to change user's full name. @@ -23,7 +23,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user fname lname' +check_args '3' "$#" 'USER FNAME LNAME' validate_format 'user' 'fname' 'lname' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" diff --git a/bin/v-change-user-ns b/bin/v-change-user-ns index 9decfa80..561eba7f 100755 --- a/bin/v-change-user-ns +++ b/bin/v-change-user-ns @@ -1,6 +1,6 @@ #!/bin/bash # info: change user nameservers -# options: user ns1 ns2 [ns3] [ns4] +# options: USER NS1 NS2 [NS3] [NS4] # # The function for changing default nameservers for speciefic user. @@ -26,7 +26,7 @@ source $VESTA/func/main.sh #----------------------------------------------------------# # Checking args -check_args '3' "$#" 'user ns1 ns2 [ns3] [ns4]' +check_args '3' "$#" 'USER NS1 NS2 [NS3] [NS4]' # Checking argument format validate_format 'user' 'ns1' 'ns2' diff --git a/bin/v-change-user-package b/bin/v-change-user-package index 1ad24352..40761ba8 100755 --- a/bin/v-change-user-package +++ b/bin/v-change-user-package @@ -1,6 +1,6 @@ #!/bin/bash # info: change user package -# options: user package [force] +# options: USER PACKAGE [FORCE] # # The function changes user's hosting package. @@ -116,7 +116,7 @@ DATE='$DATE'" > $USER_DATA/user.conf # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user package [force]' +check_args '2' "$#" 'USER PACKAGE [FORCE]' validate_format 'user' 'package' is_object_valid 'user' 'USER' "$user" is_package_valid diff --git a/bin/v-change-user-password b/bin/v-change-user-password index ecc5c288..10bbe570 100755 --- a/bin/v-change-user-password +++ b/bin/v-change-user-password @@ -1,6 +1,6 @@ #!/bin/bash # info: change user password -# options: user password +# options: USER PASSWORD # # The function changes user's password and updates RKEY value. @@ -27,7 +27,7 @@ EVENT="$EVENT A4='$A4' A5='$A5' A6='$A6' A7='$A7' A8='$A8' A9='$A9'" # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user password' +check_args '2' "$#" 'USER PASSWORD' validate_format 'user' 'password' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" diff --git a/bin/v-change-user-shell b/bin/v-change-user-shell index f28c8b79..71c0496f 100755 --- a/bin/v-change-user-shell +++ b/bin/v-change-user-shell @@ -1,6 +1,6 @@ #!/bin/bash # info: change user shell -# options: user shell +# options: USER SHELL # # The function changes system shell of a user. Shell gives abilty to use ssh. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user shell' +check_args '2' "$#" 'USER SHELL' validate_format 'user' 'shell' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" diff --git a/bin/v-change-user-template b/bin/v-change-user-template index 4e8456a3..54382f12 100755 --- a/bin/v-change-user-template +++ b/bin/v-change-user-template @@ -1,6 +1,6 @@ #!/bin/bash # info: change user default template -# options: user template +# options: USER TEMPLATE # # The function changes default user web template. @@ -23,7 +23,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user template' +check_args '2' "$#" 'USER TEMPLATE' validate_format 'user' 'template' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" diff --git a/bin/v-change-web-domain-ftp b/bin/v-change-web-domain-ftp index e870a67b..1b94e85f 100755 --- a/bin/v-change-web-domain-ftp +++ b/bin/v-change-web-domain-ftp @@ -1,6 +1,6 @@ #!/bin/bash # info: add ftp account for web domain. -# options: user domain ftp_user ftp_password +# options: USER DOMAIN FTP_USER FTP_PASSWORD # # The function creates addutional ftp account for web domain. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '4' "$#" 'user domain ftp_user ftp_password' +check_args '4' "$#" 'USER DOMAIN FTP_USER FTP_PASSWORD' validate_format 'user' 'domain' 'ftp_user' 'ftp_password' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-web-domain-ip b/bin/v-change-web-domain-ip index 936689d6..5032f3b2 100755 --- a/bin/v-change-web-domain-ip +++ b/bin/v-change-web-domain-ip @@ -1,6 +1,6 @@ #!/bin/bash # info: change web domain ip address -# options: user domain ip [restart] +# options: USER DOMAIN IP [RESTART] # # The call is used for changing the site ip address. The ip change will be # performed for a virtual apache host and for a configuration nginx file both. @@ -28,7 +28,7 @@ source $VESTA/func/ip.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain ip [restart]' +check_args '3' "$#" 'USER DOMAIN IP [RESTART]' validate_format 'user' 'domain' 'ip' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-web-domain-nginx-tpl b/bin/v-change-web-domain-nginx-tpl index 23b6ed07..61bd2bca 100755 --- a/bin/v-change-web-domain-nginx-tpl +++ b/bin/v-change-web-domain-nginx-tpl @@ -1,6 +1,6 @@ #!/bin/bash # info: change web domain nginx template -# options: user domain template [extentions] [restart] +# options: USER DOMAIN TEMPLATE [EXTENTIONS] [RESTART] # # The function changes template of nginx.conf configuration file. The content # of webdomain directories remains untouched. @@ -31,7 +31,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain template [extentions] [restart]' +check_args '3' "$#" 'USER DOMAIN TEMPLATE [EXTENTIONS] [RESTART]' validate_format 'user' 'domain' 'template' is_system_enabled "$PROXY_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-web-domain-sslcert b/bin/v-change-web-domain-sslcert index fbc8f03f..dc7edaf8 100755 --- a/bin/v-change-web-domain-sslcert +++ b/bin/v-change-web-domain-sslcert @@ -1,6 +1,6 @@ #!/bin/bash # info: change domain ssl certificate -# options: user domain ssl_dir +# options: USER DOMAIN SSL_DIR # # The function changes SSL domain certificate and the key. If ca file present # it will be replaced as well. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain ssl_dir' +check_args '3' "$#" 'USER DOMAIN SSL_DIR' validate_format 'user' 'domain' 'ssl_dir' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-change-web-domain-sslhome b/bin/v-change-web-domain-sslhome index 633a602c..03a0ea38 100755 --- a/bin/v-change-web-domain-sslhome +++ b/bin/v-change-web-domain-sslhome @@ -21,7 +21,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain ssl_home' +check_args '3' "$#" 'USER DOMAIN SSL_HOME' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" @@ -48,7 +48,7 @@ case $SSL_HOME in old="$HOMEDIR/$user/web/$domain/public_html" ;; same) new="$HOMEDIR/$user/web/$domain/public_html" ; old="$HOMEDIR/$user/web/$domain/public_shtml" ;; - *) check_args '3' "2" 'user domain sslhome' + *) check_args '3' "2" 'USER DOMAIN SSLHOME' esac # Changing sslhome directory diff --git a/bin/v-change-web-domain-stats b/bin/v-change-web-domain-stats index 4abcd200..f4497440 100755 --- a/bin/v-change-web-domain-stats +++ b/bin/v-change-web-domain-stats @@ -1,6 +1,6 @@ #!/bin/bash # info: change web domain statistics -# options: user domain type +# options: USER DOMAIN TYPE # # The function of deleting site's system of statistics. Its type is # automatically chooses from client's configuration file. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain type' +check_args '3' "$#" 'USER DOMAIN TYPE' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_type_valid "$STATS_SYSTEM" "$type" diff --git a/bin/v-change-web-domain-tpl b/bin/v-change-web-domain-tpl index 35964da7..b812910a 100755 --- a/bin/v-change-web-domain-tpl +++ b/bin/v-change-web-domain-tpl @@ -1,6 +1,6 @@ #!/bin/bash # info: change web domain template -# options: user domain template [restart] +# options: USER DOMAIN TEMPLATE [RESTART] # # The function changes template of httpd.conf configuration file. The content # of webdomain directories remains untouched. @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain template [restart]' +check_args '3' "$#" 'USER DOMAIN TEMPLATE [RESTART]' validate_format 'user' 'domain' 'template' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-cron-job b/bin/v-delete-cron-job index fd71812f..13527d0a 100755 --- a/bin/v-delete-cron-job +++ b/bin/v-delete-cron-job @@ -1,6 +1,6 @@ #!/bin/bash # info: delete cron job -# options: user job +# options: USER JOB # # The function deletes cron job. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user job' +check_args '2' "$#" 'USER JOB' validate_format 'user' 'job' is_system_enabled "$CRON_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-cron-reports b/bin/v-delete-cron-reports index 22fbc0b1..10fd121f 100755 --- a/bin/v-delete-cron-reports +++ b/bin/v-delete-cron-reports @@ -1,6 +1,6 @@ #!/bin/bash # info: delete cron reports -# options: user +# options: USER # # The script for disabling reports on cron tasks and administrative # notifications. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$CRON_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-database b/bin/v-delete-database index 3a657865..47860c9f 100755 --- a/bin/v-delete-database +++ b/bin/v-delete-database @@ -1,6 +1,6 @@ #!/bin/bash # info: delete database -# options: user database +# options: USER DATABASE # # The function for deleting the database. If database user have access to # another database, he will not be deleted. @@ -24,7 +24,7 @@ source $VESTA/func/db.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user database' +check_args '2' "$#" 'USER DATABASE' validate_format 'user' 'database' is_system_enabled "$DB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-database-server b/bin/v-delete-database-server index 843d5045..3fd5f43d 100755 --- a/bin/v-delete-database-server +++ b/bin/v-delete-database-server @@ -1,6 +1,6 @@ #!/bin/bash # info: delete database server -# options: type host +# options: TYPE HOST # # The function for deleting the database host from vesta configuration. It will # be deleted if there are no databases created on it only. @@ -24,7 +24,7 @@ source $VESTA/func/db.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" "type host" +check_args '2' "$#" 'TYPE HOST' validate_format 'type' 'host' is_system_enabled "$DB_SYSTEM" is_type_valid "$DB_SYSTEM" "$type" diff --git a/bin/v-delete-databases b/bin/v-delete-databases index 2069be0b..fa3772a7 100755 --- a/bin/v-delete-databases +++ b/bin/v-delete-databases @@ -1,6 +1,6 @@ #!/bin/bash # info: delete user databases -# options: user +# options: USER # # The function deletes all user databases. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$DB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-dns-domain b/bin/v-delete-dns-domain index 529764c7..fa674d3d 100755 --- a/bin/v-delete-dns-domain +++ b/bin/v-delete-dns-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: delete dns domain -# options: user domain +# options: USER DOMAIN # # The function for deleting DNS domain. By deleting it all records will also be # deleted. @@ -25,7 +25,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-dns-domain-record b/bin/v-delete-dns-domain-record index 5b6aa1a0..c2b1491b 100755 --- a/bin/v-delete-dns-domain-record +++ b/bin/v-delete-dns-domain-record @@ -1,6 +1,6 @@ #!/bin/bash # info: delete dns record -# options: user domain id +# options: USER DOMAIN ID # # The function for deleting a certain record of DNS zone. @@ -25,7 +25,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain id' +check_args '3' "$#" 'USER DOMAIN ID' validate_format 'user' 'domain' 'id' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" diff --git a/bin/v-delete-dns-domains b/bin/v-delete-dns-domains index 378beb20..1d65dccd 100755 --- a/bin/v-delete-dns-domains +++ b/bin/v-delete-dns-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: delete dns domains -# options: user +# options: USER # # The function for deleting all users DNS domains. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-dns-on-web-alias b/bin/v-delete-dns-on-web-alias index aac8ea1d..50c1e1d7 100755 --- a/bin/v-delete-dns-on-web-alias +++ b/bin/v-delete-dns-on-web-alias @@ -1,6 +1,6 @@ #!/bin/bash # info: delete dns domain or dns record based on web domain alias -# options: user domain +# options: USER DOMAIN # # The function deletes dns domain or dns record based on web domain alias. @@ -29,7 +29,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain alias' +check_args '3' "$#" 'USER DOMAIN ALIAS' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_system_enabled "$DNS_SYSTEM" diff --git a/bin/v-delete-mail-account b/bin/v-delete-mail-account index ad8a127f..8fb45684 100755 --- a/bin/v-delete-mail-account +++ b/bin/v-delete-mail-account @@ -1,6 +1,6 @@ #!/bin/bash # info: delete mail account -# options: user domain account +# options: USER DOMAIN ACCOUNT # # The function deletes email account. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain account' +check_args '3' "$#" 'USER DOMAIN ACCOUNT' validate_format 'user' 'domain' 'account' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-mail-account-alias b/bin/v-delete-mail-account-alias index 6a3744a8..e6904654 100755 --- a/bin/v-delete-mail-account-alias +++ b/bin/v-delete-mail-account-alias @@ -1,6 +1,6 @@ #!/bin/bash # info: delete mail account alias aka nickname -# options: user domain account alias +# options: USER DOMAIN ACCOUNT ALIAS # # The function deletes email account alias. @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '4' "$#" 'user domain account alias' +check_args '4' "$#" 'USER DOMAIN ACCOUNT ALIAS' validate_format 'user' 'domain' 'account' 'malias' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-mail-account-autoreply b/bin/v-delete-mail-account-autoreply index 6e72dba3..37996e2c 100755 --- a/bin/v-delete-mail-account-autoreply +++ b/bin/v-delete-mail-account-autoreply @@ -1,6 +1,6 @@ #!/bin/bash # info: delete mail account autoreply message -# options: user domain account alias +# options: USER DOMAIN ACCOUNT ALIAS # # The function delete email account autoreply. @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain account' +check_args '3' "$#" 'USER DOMAIN ACCOUNT' validate_format 'user' 'domain' 'account' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-mail-account-forward b/bin/v-delete-mail-account-forward index 7066e0a7..007adb13 100755 --- a/bin/v-delete-mail-account-forward +++ b/bin/v-delete-mail-account-forward @@ -1,6 +1,6 @@ #!/bin/bash # info: delte mail account forward -# options: user domain account email +# options: USER DOMAIN ACCOUNT EMAIL # # The function add delete email account forward address. @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '4' "$#" 'user domain account forward' +check_args '4' "$#" 'USER DOMAIN ACCOUNT FORWARD' validate_format 'user' 'domain' 'account' 'forward' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-mail-domain b/bin/v-delete-mail-domain index 1d50f83b..f610cdf5 100755 --- a/bin/v-delete-mail-domain +++ b/bin/v-delete-mail-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: delete mail domain -# options: user domain +# options: USER DOMAIN # # The function for deleting MAIL domain. By deleting it all accounts will # also be deleted. @@ -24,7 +24,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-mail-domain-antispam b/bin/v-delete-mail-domain-antispam index 01ecb919..7eb31701 100755 --- a/bin/v-delete-mail-domain-antispam +++ b/bin/v-delete-mail-domain-antispam @@ -1,6 +1,6 @@ #!/bin/bash # info: delete mail domain antispam support -# options: user domain +# options: USER DOMAIN # # The function disable spamassasin for incomming emails. @@ -25,7 +25,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-mail-domain-antivirus b/bin/v-delete-mail-domain-antivirus index 3fcc6ec7..6ddeae4d 100755 --- a/bin/v-delete-mail-domain-antivirus +++ b/bin/v-delete-mail-domain-antivirus @@ -1,6 +1,6 @@ #!/bin/bash # info: delete mail domain antivirus support -# options: user domain +# options: USER DOMAIN # # The function disables clamav scan for incomming emails. @@ -25,7 +25,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-mail-domain-catchall b/bin/v-delete-mail-domain-catchall index 6f90b354..a984b400 100755 --- a/bin/v-delete-mail-domain-catchall +++ b/bin/v-delete-mail-domain-catchall @@ -1,6 +1,6 @@ #!/bin/bash # info: delete mail domain catchall email -# options: user domain +# options: USER DOMAIN # # The function disables mail domain cathcall. @@ -25,7 +25,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-mail-domain-dkim b/bin/v-delete-mail-domain-dkim index 6e639703..88028331 100755 --- a/bin/v-delete-mail-domain-dkim +++ b/bin/v-delete-mail-domain-dkim @@ -1,6 +1,6 @@ #!/bin/bash # info: delete mail domain dkim support -# options: user domain [dkim_size] +# options: USER DOMAIN [DKIM_SIZE] # # The function delete DKIM domain pem. @@ -24,7 +24,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-mail-domains b/bin/v-delete-mail-domains index 27a9e129..d3f5cc2a 100755 --- a/bin/v-delete-mail-domains +++ b/bin/v-delete-mail-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: delete mail domains -# options: user +# options: USER # # The function for deleting all users mail domains. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-sys-ip b/bin/v-delete-sys-ip index 92c0a39b..f6951e59 100755 --- a/bin/v-delete-sys-ip +++ b/bin/v-delete-sys-ip @@ -1,6 +1,6 @@ #!/bin/bash # info: delete system ip -# options: ip +# options: IP # # The function for deleting a system ip. It does not allow to delete first ip # on interface and do not allow to delete ip which is used by a web domain. @@ -24,7 +24,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'ip' +check_args '1' "$#" 'IP' validate_format 'ip' is_ip_valid "$ip" is_ip_key_empty '$U_WEB_DOMAINS' diff --git a/bin/v-delete-user b/bin/v-delete-user index 927f49c1..ad84fe94 100755 --- a/bin/v-delete-user +++ b/bin/v-delete-user @@ -1,6 +1,6 @@ #!/bin/bash # info: delete user -# options: user +# options: USER # # This function deletes a certain user and all his resourses such as domains, # databases, cron jobs, etc. @@ -26,7 +26,7 @@ source $VESTA/func/ip.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" diff --git a/bin/v-delete-user-backup b/bin/v-delete-user-backup index ba3bb5f6..863b39b5 100755 --- a/bin/v-delete-user-backup +++ b/bin/v-delete-user-backup @@ -1,6 +1,6 @@ #!/bin/bash # info: delete user backup -# options: user nackup +# options: USER NACKUP # # The function deletes user backup. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user backup' +check_args '2' "$#" 'USER BACKUP' validate_format 'user' 'backup' is_system_enabled "$BACKUP_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-user-ips b/bin/v-delete-user-ips index 864694e0..bf7b0640 100755 --- a/bin/v-delete-user-ips +++ b/bin/v-delete-user-ips @@ -1,6 +1,6 @@ #!/bin/bash # info: delete user ips -# options: user +# options: USER # # The function deletes all user's ip addresses. @@ -22,7 +22,7 @@ source $VESTA/func/ip.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" diff --git a/bin/v-delete-user-package b/bin/v-delete-user-package index 1867bf96..d9862acd 100755 --- a/bin/v-delete-user-package +++ b/bin/v-delete-user-package @@ -1,6 +1,6 @@ #!/bin/bash # info: delete user package -# options: package +# options: PACKAGE # # The function for deleting user package. It does not allow to delete pacakge # if it is in use. @@ -31,7 +31,7 @@ is_package_in_use() { # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'package' +check_args '1' "$#" 'PACKAGE' validate_format 'package' is_package_valid is_package_in_use diff --git a/bin/v-delete-web-domain b/bin/v-delete-web-domain index d58cd70c..eed4d1dc 100755 --- a/bin/v-delete-web-domain +++ b/bin/v-delete-web-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: delete web domain -# options: user domain +# options: USER DOMAIN # # The call of function leads to the removal of domain and all its components # (statistics, folders contents, ssl certificates, etc.). This operation is @@ -29,7 +29,7 @@ source $VESTA/func/ip.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-web-domain-alias b/bin/v-delete-web-domain-alias index 7bb7d8fa..55b94ef1 100755 --- a/bin/v-delete-web-domain-alias +++ b/bin/v-delete-web-domain-alias @@ -1,6 +1,6 @@ #!/bin/bash # info: delete web domain alias -# options: user domain alias [restart] +# options: USER DOMAIN ALIAS [RESTART] # # The function of deleting the alias domain (parked domain). By this call # default www aliase can be removed as well. @@ -28,7 +28,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain dom_alias [restart]' +check_args '3' "$#" 'USER DOMAIN DOM_ALIAS [RESTART]' validate_format 'user' 'domain' 'dom_alias' is_system_enabled 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-web-domain-cgi b/bin/v-delete-web-domain-cgi index 47b057cd..847fb2a8 100755 --- a/bin/v-delete-web-domain-cgi +++ b/bin/v-delete-web-domain-cgi @@ -1,6 +1,6 @@ #!/bin/bash # info: delete web domain cgi support -# options: user domain +# options: USER DOMAIN # # The function for deleting cgi support (adds -ExecCGI directive into # configuration file). It is recommended to apply this function only for a @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-web-domain-elog b/bin/v-delete-web-domain-elog index 4b33fa7f..9eeda488 100755 --- a/bin/v-delete-web-domain-elog +++ b/bin/v-delete-web-domain-elog @@ -1,6 +1,6 @@ #!/bin/bash # info: delete web domain error loggin support -# options: user domain [restart] +# options: USER DOMAIN [RESTART] # # The function of disabling error logging feature. It comments ErrorLog # direcitve in apache or/and nginx configuration. The data already collected @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [restart]' +check_args '2' "$#" 'USER DOMAIN [RESTART]' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" "$user" diff --git a/bin/v-delete-web-domain-ftp b/bin/v-delete-web-domain-ftp index 80942be7..ca71d31d 100755 --- a/bin/v-delete-web-domain-ftp +++ b/bin/v-delete-web-domain-ftp @@ -1,6 +1,6 @@ #!/bin/bash # info: delete webdomain ftp account. -# options: user domain +# options: USER DOMAIN # # The function deletes additional ftp account. @@ -24,7 +24,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-web-domain-nginx b/bin/v-delete-web-domain-nginx index f7613ae2..4c4c4b03 100755 --- a/bin/v-delete-web-domain-nginx +++ b/bin/v-delete-web-domain-nginx @@ -1,6 +1,6 @@ #!/bin/bash # info: deleting web domain nginx configuration -# options: user domain +# options: USER DOMAIN # # The function of deleting the virtualhost nginx configuration. @@ -25,7 +25,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-web-domain-ssl b/bin/v-delete-web-domain-ssl index c3361514..36743408 100755 --- a/bin/v-delete-web-domain-ssl +++ b/bin/v-delete-web-domain-ssl @@ -1,6 +1,6 @@ #!/bin/bash # info: delete web domain ssl support -# options: user domain +# options: USER DOMAIN # # The function disable https support and deletes SSL certificates. @@ -25,7 +25,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-web-domain-stats b/bin/v-delete-web-domain-stats index 04124675..a6913099 100755 --- a/bin/v-delete-web-domain-stats +++ b/bin/v-delete-web-domain-stats @@ -1,6 +1,6 @@ #!/bin/bash # info: delete web domain statistics -# options: user domain +# options: USER DOMAIN # # The function of deleting site's system of statistics. Its type is # automatically chooses from client's configuration file. @@ -24,7 +24,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-web-domain-stats-user b/bin/v-delete-web-domain-stats-user index 35f24441..dc63a3eb 100755 --- a/bin/v-delete-web-domain-stats-user +++ b/bin/v-delete-web-domain-stats-user @@ -1,6 +1,6 @@ #!/bin/bash # info: disable webdomain stats authentication support -# options: user domain +# options: USER DOMAIN # # The function removes authentication of statistics system. If the script is # called without naming a certain user, all users will be removed. After @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-delete-web-domains b/bin/v-delete-web-domains index fe791006..2824433f 100755 --- a/bin/v-delete-web-domains +++ b/bin/v-delete-web-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: delete web domains -# options: user [restart] +# options: USER [RESTART] # # The function deteles all user's webdomains. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [restart]' +check_args '1' "$#" 'USER [RESTART]' validate_format 'user' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-get-dns-domain-value b/bin/v-get-dns-domain-value index a69ae269..b5b88d77 100755 --- a/bin/v-get-dns-domain-value +++ b/bin/v-get-dns-domain-value @@ -1,6 +1,6 @@ #!/bin/bash # info: get dns domain value -# options: user domain key +# options: USER DOMAIN KEY # # The function for getting a certain DNS domain parameter. @@ -23,7 +23,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain key' +check_args '3' "$#" 'USER DOMAIN KEY' validate_format 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" diff --git a/bin/v-get-mail-account-value b/bin/v-get-mail-account-value index 067fcb6b..c920e2fa 100755 --- a/bin/v-get-mail-account-value +++ b/bin/v-get-mail-account-value @@ -1,6 +1,6 @@ #!/bin/bash # info: get mail account value -# options: user domain account key +# options: USER DOMAIN ACCOUNT KEY # # The function for getting a certain mail account parameter. @@ -24,7 +24,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain key' +check_args '3' "$#" 'USER DOMAIN KEY' validate_format 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" diff --git a/bin/v-get-mail-domain-value b/bin/v-get-mail-domain-value index 1fd54adc..1fab391f 100755 --- a/bin/v-get-mail-domain-value +++ b/bin/v-get-mail-domain-value @@ -1,6 +1,6 @@ #!/bin/bash # info: get mail domain value -# options: user domain key +# options: USER DOMAIN KEY # # The function for getting a certain mail domain parameter. @@ -23,7 +23,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain key' +check_args '3' "$#" 'USER DOMAIN KEY' validate_format 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" diff --git a/bin/v-get-user-value b/bin/v-get-user-value index d8c193fd..f5eeb99d 100755 --- a/bin/v-get-user-value +++ b/bin/v-get-user-value @@ -1,6 +1,6 @@ #!/bin/bash # info: get user value -# options: user key +# options: USER KEY # # The function for obtaining certain user's parameters. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user key' +check_args '2' "$#" 'USER KEY' validate_format 'user' is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-get-web-domain-value b/bin/v-get-web-domain-value index 1d968261..f1529da6 100755 --- a/bin/v-get-web-domain-value +++ b/bin/v-get-web-domain-value @@ -1,6 +1,6 @@ #!/bin/bash # info: get web domain value -# options: user domain key +# options: USER DOMAIN KEY # # The function is intended for obtaining a domain value by the key. This call # is useful for arranging composite queries. The answer is displayed only in @@ -27,7 +27,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain key' +check_args '3' "$#" 'USER DOMAIN KEY' validate_format 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" diff --git a/bin/v-list-cron-job b/bin/v-list-cron-job index 3e9488be..166525ea 100755 --- a/bin/v-list-cron-job +++ b/bin/v-list-cron-job @@ -1,6 +1,6 @@ #!/bin/bash # info: list cron job -# options: user job [format] +# options: USER JOB [FORMAT] # # The function of obtaining cron job settings. @@ -62,7 +62,7 @@ shell_list_job() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user job [format]' +check_args '2' "$#" 'USER JOB [FORMAT]' is_object_valid 'user' 'USER' "$user" @@ -80,7 +80,7 @@ case $format in json) json_list_job ;; plain) nohead=1; shell_list_job ;; shell) shell_list_job |column -t ;; - *) check_args '2' '0' 'user job [format]' + *) check_args '2' '0' 'USER JOB [FORMAT]' esac diff --git a/bin/v-list-cron-jobs b/bin/v-list-cron-jobs index 944bada2..1fc327fd 100755 --- a/bin/v-list-cron-jobs +++ b/bin/v-list-cron-jobs @@ -1,6 +1,6 @@ #!/bin/bash # info: list user cron jobs -# options: user [format] +# options: USER [FORMAT] # # The function for obtaining the list of all users cron jobs. @@ -70,7 +70,7 @@ shell_list_cron() { # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -95,7 +95,7 @@ case $format in shell_list_cron ;; shell) fields='$JOB~$SUSPENDED~$MIN~$HOUR~$DAY~$MONTH~$WDAY~$CMD'; shell_list_cron |column -t -s '~';; - *) check_args '1' '0' 'user [format]' ;; + *) check_args '1' '0' 'USER [FORMAT]' ;; esac diff --git a/bin/v-list-database b/bin/v-list-database index 16cbbe90..d9136aee 100755 --- a/bin/v-list-database +++ b/bin/v-list-database @@ -1,6 +1,6 @@ #!/bin/bash # info: list database -# options: user database [format] +# options: USER DATABASE [FORMAT] # # The function for obtaining of all database's parameters. @@ -58,7 +58,7 @@ shell_list_db() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user database [format]' +check_args '2' "$#" 'USER DATABASE [FORMAT]' validate_format 'user' 'database' is_object_valid 'user' 'USER' "$user" is_object_valid 'db' 'DB' "$database" @@ -78,7 +78,7 @@ case $format in json) json_list_db ;; plain) shell_list_db ;; shell) shell_list_db | column -t ;; - *) check_args '2' '0' 'user database [format]' + *) check_args '2' '0' 'USER DATABASE [FORMAT]' esac diff --git a/bin/v-list-database-server b/bin/v-list-database-server index 36776ddc..f459c7d0 100755 --- a/bin/v-list-database-server +++ b/bin/v-list-database-server @@ -1,6 +1,6 @@ #!/bin/bash # info: list database server -# options: type host [format] +# options: TYPE HOST [FORMAT] # # The function for obtaining database server parameters. @@ -58,7 +58,7 @@ shell_list_dbhost() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'type host [format]' +check_args '2' "$#" 'TYPE HOST [FORMAT]' validate_format 'host' is_object_valid "../../conf/$type" 'HOST' "$host" @@ -77,7 +77,7 @@ case $format in json) json_list_dbhost ;; plain) nohead=1; shell_list_dbhost ;; shell) shell_list_dbhost | column -t;; - *) check_args '2' '0' 'type host [format]' + *) check_args '2' '0' 'TYPE HOST [FORMAT]' esac diff --git a/bin/v-list-database-servers b/bin/v-list-database-servers index 32b1d340..3a436f76 100755 --- a/bin/v-list-database-servers +++ b/bin/v-list-database-servers @@ -1,6 +1,6 @@ #!/bin/bash # info: list database servers -# options: type [format] +# options: TYPE [FORMAT] # # The function for obtaining the list of all hosts of the same databases' type. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh #----------------------------------------------------------# # Checking args -check_args '1' "$#" 'type [format]' +check_args '1' "$#" 'TYPE [FORMAT]' #----------------------------------------------------------# @@ -40,7 +40,7 @@ case $format in plain) nohead=1; shell_list;; shell) fields='$HOST $PORT $MAX_DB $U_DB_BASES $SUSPENDED $DATE'; shell_list | column -t ;; - *) check_args '2' '0' 'type [format]' + *) check_args '2' '0' 'TYPE [FORMAT]' esac diff --git a/bin/v-list-database-types b/bin/v-list-database-types index a3bf247b..8a08a25b 100755 --- a/bin/v-list-database-types +++ b/bin/v-list-database-types @@ -1,6 +1,6 @@ #!/bin/bash # info: list supported database types -# options: [format] +# options: [FORMAT] # # The function for obtaining the list of database types. @@ -55,7 +55,7 @@ case $format in json) json_list_dbtypes ;; plain) nohead=1; shell_list_dbtypes ;; shell) shell_list_dbtypes ;; - *) check_args '1' '0' '[format]' ;; + *) check_args '1' '0' '[FORMAT]' ;; esac diff --git a/bin/v-list-databases b/bin/v-list-databases index 2e2c545e..282fb52c 100755 --- a/bin/v-list-databases +++ b/bin/v-list-databases @@ -1,6 +1,6 @@ #!/bin/bash # info: listing databases -# options: user [format] +# options: USER [FORMAT] # # The function for obtaining the list of all user's databases. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -40,7 +40,7 @@ case $format in plain) nohead=1; shell_list ;; shell) fields='$DB $DBUSER $HOST $TYPE $U_DISK $DATE'; shell_list | column -t ;; - *) check_args '1' '0' 'user [format]' + *) check_args '1' '0' 'USER [FORMAT]' esac diff --git a/bin/v-list-dns-domain b/bin/v-list-dns-domain index db3da01c..8f24a37c 100755 --- a/bin/v-list-dns-domain +++ b/bin/v-list-dns-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: list dns domain -# options: user domain [format] +# options: USER DOMAIN [FORMAT] # # The function of obtaining the list of domain parameters. This call, just as # all v_list_* calls, supports 3 formats - json, shell and plain. @@ -76,7 +76,7 @@ shell_list_domain() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [format]' +check_args '2' "$#" 'USER DOMAIN [FORMAT]' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" @@ -94,7 +94,7 @@ case $format in json) json_list_domain ;; plain) nohead=1; shell_list_domain ;; shell) shell_list_domain |column -t ;; - *) check_args '2' '0' 'user domain [format]' + *) check_args '2' '0' 'USER DOMAIN [FORMAT]' esac diff --git a/bin/v-list-dns-domain-records b/bin/v-list-dns-domain-records index 785a8441..56ed5fb9 100755 --- a/bin/v-list-dns-domain-records +++ b/bin/v-list-dns-domain-records @@ -1,6 +1,6 @@ #!/bin/bash # info: list dns domain records -# options: user domain [format] +# options: USER DOMAIN [FORMAT] # # The function for getting all DNS domain records. @@ -74,7 +74,7 @@ shell_list_dns() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [format]' +check_args '2' "$#" 'USER DOMAIN [FORMAT]' validate_format 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" @@ -94,7 +94,7 @@ case $format in plain) nohead=1; shell_list_dns ;; shell) fields='$ID $RECORD $TYPE $VALUE'; shell_list_dns | column -t ;; - *) check_args '2' '0' 'user domain [format]' + *) check_args '2' '0' 'USER DOMAIN [FORMAT]' esac diff --git a/bin/v-list-dns-domains b/bin/v-list-dns-domains index 0ad1dd2f..10ccafa5 100755 --- a/bin/v-list-dns-domains +++ b/bin/v-list-dns-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: list dns domains -# options: user [format] +# options: USER [FORMAT] # # The function for obtaining all DNS domains of a user. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -40,7 +40,7 @@ case $format in plain) nohead=1; shell_list ;; shell) fields='$DOMAIN $IP $TPL $TTL $EXP $DATE'; shell_list| column -t ;; - *) check_args '1' '0' 'user [format]';; + *) check_args '1' '0' 'USER [FORMAT]';; esac diff --git a/bin/v-list-dns-template b/bin/v-list-dns-template index c6f4abe1..5ff2b337 100755 --- a/bin/v-list-dns-template +++ b/bin/v-list-dns-template @@ -1,6 +1,6 @@ #!/bin/bash # info: list dns template -# options: template [format] +# options: TEMPLATE [FORMAT] # # The function for obtaining the DNS template parameters. @@ -73,7 +73,7 @@ shell_list_dns() { # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'template [format]' +check_args '1' "$#" 'TEMPLATE [FORMAT]' validate_format 'template' is_dns_template_valid @@ -91,7 +91,7 @@ case $format in json) json_list_dns ;; plain) nohead=1; shell_list_dns ;; shell) shell_list_dns | column -t ;; - *) check_args '1' '0' 'template [format]';; + *) check_args '1' '0' 'TEMPLATE [FORMAT]';; esac diff --git a/bin/v-list-dns-templates b/bin/v-list-dns-templates index a837fc44..18090b52 100755 --- a/bin/v-list-dns-templates +++ b/bin/v-list-dns-templates @@ -1,6 +1,6 @@ #!/bin/bash # info: list dns templates -# options: [format] +# options: [FORMAT] # # The function for obtaining the list of all DNS templates available. @@ -54,7 +54,7 @@ case $format in json) json_list_dnstpl;; plain) nohead=1; shell_list_dnstpl ;; shell) shell_list_dnstpl ;; - *) check_args '1' '0' '[format] [limit] [offset]';; + *) check_args '1' '0' '[FORMAT] [LIMIT] [OFFSET]';; esac diff --git a/bin/v-list-mail-account b/bin/v-list-mail-account index a9e3bc67..eb18c6a2 100755 --- a/bin/v-list-mail-account +++ b/bin/v-list-mail-account @@ -1,6 +1,6 @@ #!/bin/bash # info: list mail domain account -# options: user domain account [format] +# options: USER DOMAIN ACCOUNT [FORMAT] # # The function of obtaining the list of account parameters. @@ -62,7 +62,7 @@ shell_list_account() { # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain account [format]' +check_args '3' "$#" 'USER DOMAIN ACCOUNT [FORMAT]' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" is_object_valid "mail/$domain" 'ACCOUNT' "$account" @@ -83,7 +83,7 @@ case $format in json) json_list_account ;; plain) nohead=1; shell_list_account ;; shell) shell_list_account |column -t ;; - *) check_args '2' '0' 'user domain account [format]' + *) check_args '2' '0' 'USER DOMAIN ACCOUNT [FORMAT]' esac diff --git a/bin/v-list-mail-account-autoreply b/bin/v-list-mail-account-autoreply index f8de66f3..c5ba6020 100755 --- a/bin/v-list-mail-account-autoreply +++ b/bin/v-list-mail-account-autoreply @@ -1,6 +1,6 @@ #!/bin/bash # info: list mail account autoreply -# options: user domain account [format] +# options: USER DOMAIN ACCOUNT [FORMAT] # # The function of obtainin mail account autoreply message. @@ -39,7 +39,7 @@ shell_list_msg() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [format]' +check_args '2' "$#" 'USER DOMAIN [FORMAT]' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" is_object_unsuspended 'mail' 'DOMAIN' "$domain" @@ -61,7 +61,7 @@ case $format in json) json_list_msg ;; plain) nohead=1; shell_list_msg ;; shell) shell_list_msg ;; - *) check_args '1' '0' '[format]' + *) check_args '1' '0' '[FORMAT]' esac diff --git a/bin/v-list-mail-accounts b/bin/v-list-mail-accounts index 7100b70f..15a07187 100755 --- a/bin/v-list-mail-accounts +++ b/bin/v-list-mail-accounts @@ -1,6 +1,6 @@ #!/bin/bash # info: list mail domain accounts -# options: user domain [format] +# options: USER DOMAIN [FORMAT] # # The function of obtaining the list of all user domains. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [format]' +check_args '2' "$#" 'USER DOMAIN [FORMAT]' validate_format 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" @@ -43,7 +43,7 @@ case $format in plain) nohead=1; shell_list ;; shell) fields='$ACCOUNT $AUTOREPLY $QUOTA $U_DISK $SUSPENDED $TIME $DATE'; shell_list | column -t ;; - *) check_args '1' '0' 'user [format]' + *) check_args '1' '0' 'USER [FORMAT]' esac diff --git a/bin/v-list-mail-domain b/bin/v-list-mail-domain index aeaf0806..fae89527 100755 --- a/bin/v-list-mail-domain +++ b/bin/v-list-mail-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: list web domain -# options: user domain [format] +# options: USER DOMAIN [FORMAT] # # The function of obtaining the list of domain parameters. This call, just as # all v_list_* calls, supports 3 formats - json, shell and plain. @@ -60,7 +60,7 @@ shell_list_domain() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [format]' +check_args '2' "$#" 'USER DOMAIN [FORMAT]' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" @@ -79,7 +79,7 @@ case $format in json) json_list_domain ;; plain) nohead=1; shell_list_domain ;; shell) shell_list_domain |column -t ;; - *) check_args '2' '0' 'user domain [format]' + *) check_args '2' '0' 'USER DOMAIN [FORMAT]' esac diff --git a/bin/v-list-mail-domain-dkim b/bin/v-list-mail-domain-dkim index 3985c2c3..37b8917e 100755 --- a/bin/v-list-mail-domain-dkim +++ b/bin/v-list-mail-domain-dkim @@ -1,6 +1,6 @@ #!/bin/bash # info: list mail domain dkim -# options: user domain [format] +# options: USER DOMAIN [FORMAT] # # The function of obtaining domain dkim files. @@ -41,7 +41,7 @@ shell_list_ssl() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [format]' +check_args '2' "$#" 'USER DOMAIN [FORMAT]' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" @@ -62,7 +62,7 @@ case $format in json) json_list_ssl ;; plain) nohead=1; shell_list_ssl ;; shell) shell_list_ssl ;; - *) check_args '1' '0' '[format]' + *) check_args '1' '0' '[FORMAT]' esac diff --git a/bin/v-list-mail-domains b/bin/v-list-mail-domains index 87a74515..e9daa34d 100755 --- a/bin/v-list-mail-domains +++ b/bin/v-list-mail-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: list mail domains -# options: user [format] +# options: USER [FORMAT] # # The function of obtaining the list of all user domains. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -41,7 +41,7 @@ case $format in plain) nohead=1; shell_list ;; shell) fields='$DOMAIN $ANTIVIRUS $ANTISPAM $DKIM $ACCOUNTS $U_DISK $DATE'; shell_list | column -t ;; - *) check_args '1' '0' 'user [format]' + *) check_args '1' '0' 'USER [FORMAT]' esac diff --git a/bin/v-list-sys-config b/bin/v-list-sys-config index 47df57ab..74029029 100755 --- a/bin/v-list-sys-config +++ b/bin/v-list-sys-config @@ -1,6 +1,6 @@ #!/bin/bash # info: list system config -# options: [format] +# options: [FORMAT] # # The function for obtaining the list of system parameters. diff --git a/bin/v-list-sys-interfaces b/bin/v-list-sys-interfaces index b039f531..3bc8be1e 100755 --- a/bin/v-list-sys-interfaces +++ b/bin/v-list-sys-interfaces @@ -1,6 +1,6 @@ #!/bin/bash # info: list system interfaces -# options: [format] +# options: [FORMAT] # # The function for obtaining the list of network interfaces. @@ -54,7 +54,7 @@ case $format in json) json_list_iface ;; plain) nohead=1; shell_list_iface ;; shell) shell_list_iface ;; - *) check_args '1' '0' '[format]' ;; + *) check_args '1' '0' '[FORMAT]' ;; esac diff --git a/bin/v-list-sys-ip b/bin/v-list-sys-ip index d6552186..0ba7f7c0 100755 --- a/bin/v-list-sys-ip +++ b/bin/v-list-sys-ip @@ -1,6 +1,6 @@ #!/bin/bash # info: list system ip -# options: ip [format] +# options: IP [FORMAT] # # The function for getting the list of system ip parameters. @@ -63,7 +63,7 @@ shell_list_ip() { #----------------------------------------------------------# # Checking args -check_args '1' "$#" 'ip [format]' +check_args '1' "$#" 'IP [FORMAT]' validate_format 'ip' is_ip_valid @@ -81,7 +81,7 @@ case $format in json) json_list_ip ;; plain) shell_list_ip ;; shell) shell_list_ip | column -t ;; - *) check_args '1' '0' 'ip [format]' + *) check_args '1' '0' 'IP [FORMAT]' esac diff --git a/bin/v-list-sys-ips b/bin/v-list-sys-ips index c23fe887..a757019c 100755 --- a/bin/v-list-sys-ips +++ b/bin/v-list-sys-ips @@ -1,6 +1,6 @@ #!/bin/bash # info: list system ips -# options: [format] +# options: [FORMAT] # # The function for obtaining the list of system ip's. @@ -83,7 +83,7 @@ case $format in plain) nohead=1; shell_list_ips ;; shell) fields='$IP $NETMASK $OWNER $STATUS $U_WEB_DOMAINS'; shell_list_ips | column -t ;; - *) check_args '1' '0' '[format]' + *) check_args '1' '0' '[FORMAT]' esac diff --git a/bin/v-list-sys-rrd b/bin/v-list-sys-rrd index 0d425d2f..68eb4a8c 100755 --- a/bin/v-list-sys-rrd +++ b/bin/v-list-sys-rrd @@ -1,6 +1,6 @@ #!/bin/bash # info: list system rrd charts -# options: [format] +# options: [FORMAT] # # List available rrd graphics, its titles and paths. diff --git a/bin/v-list-sys-shells b/bin/v-list-sys-shells index 587019bc..227db0d0 100755 --- a/bin/v-list-sys-shells +++ b/bin/v-list-sys-shells @@ -1,6 +1,6 @@ #!/bin/bash # info: list system shells -# options: [format] +# options: [FORMAT] # # The function for obtaining the list of system shells. @@ -56,7 +56,7 @@ case $format in json) json_list_sh ;; plain) nohead=1; shell_list_sh ;; shell) shell_list_sh ;; - *) check_args '1' '0' '[format]' ;; + *) check_args '1' '0' '[FORMAT]' ;; esac diff --git a/bin/v-list-sys-users b/bin/v-list-sys-users index f210ee72..3bae7418 100755 --- a/bin/v-list-sys-users +++ b/bin/v-list-sys-users @@ -1,6 +1,6 @@ #!/bin/bash # info: list system users -# options: [format] +# options: [FORMAT] # # The function for obtaining the list of system users without # detailed information. @@ -54,7 +54,7 @@ case $format in json) json_list_users ;; plain) nohead=1; shell_list_users ;; shell) shell_list_users ;; - *) check_args '1' '0' '[format]' ;; + *) check_args '1' '0' '[FORMAT]' ;; esac diff --git a/bin/v-list-user b/bin/v-list-user index 3b56d380..d4d798d6 100755 --- a/bin/v-list-user +++ b/bin/v-list-user @@ -1,6 +1,6 @@ #!/bin/bash # info: list system user -# options: user [format] +# options: USER [FORMAT] # # The function for obtainig the list of all user's parameters. @@ -59,7 +59,7 @@ shell_list_user() { # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-list-user-backups b/bin/v-list-user-backups index 5fc61819..c08c79f5 100755 --- a/bin/v-list-user-backups +++ b/bin/v-list-user-backups @@ -1,6 +1,6 @@ #!/bin/bash # info: list user backups -# options: user [format] +# options: USER [FORMAT] # # The function for obtainig the list of available user backups. @@ -20,7 +20,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -45,7 +45,7 @@ case $format in plain) nohead=1; shell_list ;; shell) fields='$BACKUP $TYPE $SIZE $RUNTIME $TIME $DATE'; shell_list |column -t;; - *) check_args '1' '0' '[format]' ;; + *) check_args '1' '0' '[FORMAT]' ;; esac diff --git a/bin/v-list-user-ips b/bin/v-list-user-ips index 717ad502..945556a8 100755 --- a/bin/v-list-user-ips +++ b/bin/v-list-user-ips @@ -1,6 +1,6 @@ #!/bin/bash # info: list user ips -# options: user [format] +# options: USER [FORMAT] # # The function for obtainig the list of available ip addresses. @@ -93,7 +93,7 @@ shell_list_user_ips() { # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -110,7 +110,7 @@ case $format in json) json_list_user_ips ;; plain) nohead=1; shell_list_user_ips ;; shell) shell_list_user_ips | column -t ;; - *) check_args '1' '0' 'user [format]' ;; + *) check_args '1' '0' 'USER [FORMAT]' ;; esac diff --git a/bin/v-list-user-log b/bin/v-list-user-log index 0054b8c3..c5fdcc1f 100755 --- a/bin/v-list-user-log +++ b/bin/v-list-user-log @@ -1,6 +1,6 @@ #!/bin/bash # info: list user log -# options: user [format] +# options: USER [FORMAT] # # The function of obtaining the list of 100 last users commands. @@ -56,7 +56,7 @@ json_list_history() { # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -77,7 +77,7 @@ case $format in plain) nohead=1; shell_list ;; shell) fields='$ID~$DATE~$TIME~$CMD'; shell_list |column -t -s '~';; - *) check_args '1' '0' 'user [format]' + *) check_args '1' '0' 'USER [FORMAT]' esac diff --git a/bin/v-list-user-ns b/bin/v-list-user-ns index 21c5bcd6..d296191b 100755 --- a/bin/v-list-user-ns +++ b/bin/v-list-user-ns @@ -1,6 +1,6 @@ #!/bin/bash # info: list user nameservers -# options: user [format] +# options: USER [FORMAT] # # Function for obtainig the list of user's DNS servers. @@ -50,7 +50,7 @@ shell_list_ns() { # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -64,7 +64,7 @@ case $format in json) json_list_ns ;; plain) nohead=1; shell_list_ns ;; shell) shell_list_ns ;; - *) check_args '1' '0' 'user [format]' + *) check_args '1' '0' 'USER [FORMAT]' esac diff --git a/bin/v-list-user-package b/bin/v-list-user-package index dd89bbc8..13941589 100755 --- a/bin/v-list-user-package +++ b/bin/v-list-user-package @@ -1,6 +1,6 @@ #!/bin/bash # info: list user package -# options: package [format] +# options: PACKAGE [FORMAT] # # The function for getting the list of system ip parameters. @@ -62,7 +62,7 @@ shell_list_package() { #----------------------------------------------------------# # Checking args -check_args '1' "$#" 'package [format]' +check_args '1' "$#" 'PACKAGE [FORMAT]' validate_format 'package' is_package_valid @@ -81,7 +81,7 @@ case $format in json) json_list_package ;; plain) shell_list_package ;; shell) shell_list_package | column -t ;; - *) check_args '1' '0' 'ip [format]' + *) check_args '1' '0' 'IP [FORMAT]' esac diff --git a/bin/v-list-user-packages b/bin/v-list-user-packages index 1cf32535..d4dadaa0 100755 --- a/bin/v-list-user-packages +++ b/bin/v-list-user-packages @@ -1,6 +1,6 @@ #!/bin/bash # info: list user packages -# options: [format] +# options: [FORMAT] # # The function for obtaining the list of available hosting packages. @@ -80,7 +80,7 @@ case $format in json) json_list_pkgs ;; plain) nohead=1; shell_list_pkgs ;; shell) shell_list_pkgs | column -t ;; - *) check_args '1' '0' '[format]' + *) check_args '1' '0' '[FORMAT]' esac diff --git a/bin/v-list-user-stats b/bin/v-list-user-stats index a958b9fc..b93fa50b 100755 --- a/bin/v-list-user-stats +++ b/bin/v-list-user-stats @@ -1,6 +1,6 @@ #!/bin/bash # info: list user stats -# options: user [format] +# options: USER [FORMAT] # # The function for listing user statistics @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -47,7 +47,7 @@ case $format in shell) fields='$DATE $PACKAGE $U_DISK $U_BANDWIDTH $U_WEB_DOMAINS'; fields="$fields \$U_DATABASES" shell_list | column -t ;; - *) check_args '1' '0' 'user [format]' + *) check_args '1' '0' 'USER [FORMAT]' esac diff --git a/bin/v-list-users b/bin/v-list-users index 1aa67ea6..a2d27691 100755 --- a/bin/v-list-users +++ b/bin/v-list-users @@ -1,6 +1,6 @@ #!/bin/bash # info: list system users -# options: [format] +# options: [FORMAT] # # The function for obtainig the list of all server's users. diff --git a/bin/v-list-users-stats b/bin/v-list-users-stats index b731747d..8b9af2a8 100755 --- a/bin/v-list-users-stats +++ b/bin/v-list-users-stats @@ -1,6 +1,6 @@ #!/bin/bash # info: list overall user stats -# options: [format] +# options: [FORMAT] # # The function for listing overall user statistics @@ -20,7 +20,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '0' "$#" '[format]' +check_args '0' "$#" '[FORMAT]' #----------------------------------------------------------# @@ -44,7 +44,7 @@ case $format in shell) fields='$DATE $U_DISK $U_BANDWIDTH $U_WEB_DOMAINS $U_DATABASES'; fields="$fields \$U_DATABASES" shell_list | column -t ;; - *) check_args '1' '0' '[format]' + *) check_args '1' '0' '[FORMAT]' esac diff --git a/bin/v-list-web-domain b/bin/v-list-web-domain index bf6e0190..d74d1c68 100755 --- a/bin/v-list-web-domain +++ b/bin/v-list-web-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: list web domain -# options: user domain [format] +# options: USER DOMAIN [FORMAT] # # The function of obtaining the list of domain parameters. This call, just as # all v_list_* calls, supports 3 formats - json, shell and plain. @@ -62,7 +62,7 @@ shell_list_domain() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [format]' +check_args '2' "$#" 'USER DOMAIN [FORMAT]' is_object_valid 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" @@ -83,7 +83,7 @@ case $format in json) json_list_domain ;; plain) nohead=1; shell_list_domain ;; shell) shell_list_domain |column -t;; - *) check_args '2' '0' 'user domain [format]' + *) check_args '2' '0' 'USER DOMAIN [FORMAT]' esac diff --git a/bin/v-list-web-domain-ssl b/bin/v-list-web-domain-ssl index 2b17707e..eb79b8f2 100755 --- a/bin/v-list-web-domain-ssl +++ b/bin/v-list-web-domain-ssl @@ -1,6 +1,6 @@ #!/bin/bash # info: list web domain ssl certificate -# options: user domain [format] +# options: USER DOMAIN [FORMAT] # # The function of obtaining domain ssl files. @@ -46,7 +46,7 @@ shell_list_ssl() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [format]' +check_args '2' "$#" 'USER DOMAIN [FORMAT]' is_object_valid 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" @@ -70,7 +70,7 @@ case $format in json) json_list_ssl ;; plain) nohead=1; shell_list_ssl ;; shell) shell_list_ssl ;; - *) check_args '1' '0' '[format]' + *) check_args '1' '0' '[FORMAT]' esac diff --git a/bin/v-list-web-domains b/bin/v-list-web-domains index 95442a34..17eeef03 100755 --- a/bin/v-list-web-domains +++ b/bin/v-list-web-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: list web domains -# options: user [format] +# options: USER [FORMAT] # # The function of obtaining the list of all user domains. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -44,7 +44,7 @@ case $format in plain) nohead=1; shell_list ;; shell) fields='$DOMAIN $IP $U_DISK $U_BANDWIDTH $TPL $DATE'; shell_list | column -t ;; - *) check_args '1' '0' 'user [format]' + *) check_args '1' '0' 'USER [FORMAT]' esac diff --git a/bin/v-list-web-domains-alias b/bin/v-list-web-domains-alias index 81a88666..fb8f2451 100755 --- a/bin/v-list-web-domains-alias +++ b/bin/v-list-web-domains-alias @@ -1,6 +1,6 @@ #!/bin/bash # info: list web domains and alias key -# options: user [format] +# options: USER [FORMAT] # # The function for obtaining the list of aliases of all user's domains. This # call was arranged for filling in the lack of information by applying @@ -23,7 +23,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -43,7 +43,7 @@ case $format in json) json_list ;; plain) nohead=1; shell_list ;; shell) shell_list;; - *) check_args '1' '0' 'user [format]' + *) check_args '1' '0' 'USER [FORMAT]' esac diff --git a/bin/v-list-web-domains-elog b/bin/v-list-web-domains-elog index 95f75051..ed99a044 100755 --- a/bin/v-list-web-domains-elog +++ b/bin/v-list-web-domains-elog @@ -1,6 +1,6 @@ #!/bin/bash # info: list web domains and elog key -# options: user [format] +# options: USER [FORMAT] # # The function for obtaining the list of domains with parameter ErrorLog # displayed. This call was arranged for filling in the lack of information by @@ -23,7 +23,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -43,7 +43,7 @@ case $format in json) json_list ;; plain) nohead=1; shell_list ;; shell) shell_list | column -t ;; - *) check_args '1' '0' 'user [format]' + *) check_args '1' '0' 'USER [FORMAT]' esac diff --git a/bin/v-list-web-domains-nginx b/bin/v-list-web-domains-nginx index 5bcb3082..7642eb89 100755 --- a/bin/v-list-web-domains-nginx +++ b/bin/v-list-web-domains-nginx @@ -1,6 +1,6 @@ #!/bin/bash # info: list web domains and nginx key -# options: user [format] +# options: USER [FORMAT] # # The function for obtaining the list of domains with nginx parameter # displayed. This call was arranged for filling in the lack of information by @@ -23,7 +23,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -43,7 +43,7 @@ case $format in json) json_list ;; plain) nohead=1; shell_list ;; shell) shell_list | column -t ;; - *) check_args '1' '0' 'user [format]' + *) check_args '1' '0' 'USER [FORMAT]' esac diff --git a/bin/v-list-web-domains-ssl b/bin/v-list-web-domains-ssl index 35c74200..6f05bc74 100755 --- a/bin/v-list-web-domains-ssl +++ b/bin/v-list-web-domains-ssl @@ -1,6 +1,6 @@ #!/bin/bash # info: list web domains and alias key -# options: user [format] +# options: USER [FORMAT] # # The function for obtaining the list of domains with SSL parameter displayed. # This call was arranged for filling in the lack of information by applying @@ -23,7 +23,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -43,7 +43,7 @@ case $format in json) json_list ;; plain) nohead=1; shell_list ;; shell) shell_list | column -t ;; - *) check_args '1' "0" 'user [format]' + *) check_args '1' "0" 'USER [FORMAT]' esac diff --git a/bin/v-list-web-domains-stats b/bin/v-list-web-domains-stats index b0b890ca..52c3eb23 100755 --- a/bin/v-list-web-domains-stats +++ b/bin/v-list-web-domains-stats @@ -1,6 +1,6 @@ #!/bin/bash # info: list web domains and stats key -# options: user [format] +# options: USER [FORMAT] # # The function for obtaining the list of domains with statistics parameter # displayed, including authentication settings. This call was arranged for @@ -24,7 +24,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [format]' +check_args '1' "$#" 'USER [FORMAT]' validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -44,7 +44,7 @@ case $format in json) json_list ;; plain) nohead=1; shell_list ;; shell) shell_list | column -t ;; - *) check_args '1' "0" 'user [format]' + *) check_args '1' "0" 'USER [FORMAT]' esac diff --git a/bin/v-list-web-stats b/bin/v-list-web-stats index 086dcc8f..33d56c24 100755 --- a/bin/v-list-web-stats +++ b/bin/v-list-web-stats @@ -1,6 +1,6 @@ #!/bin/bash # info: list web statistics -# options: [format] +# options: [FORMAT] # # The function for obtaining the list of web statistics analyzer. @@ -55,7 +55,7 @@ case $format in json) json_list_st ;; plain) nohead=1; shell_list_st ;; shell) shell_list_st ;; - *) check_args '1' '0' '[format]' ;; + *) check_args '1' '0' '[FORMAT]' ;; esac diff --git a/bin/v-list-web-templates b/bin/v-list-web-templates index f3009dc3..973ad913 100755 --- a/bin/v-list-web-templates +++ b/bin/v-list-web-templates @@ -1,6 +1,6 @@ #!/bin/bash # info: list web templates -# options: user [format] +# options: USER [FORMAT] # # The function for obtaining the list of apache templates available to a user. @@ -57,7 +57,7 @@ case $format in json) json_list_wtpl ;; plain) nohead=1; shell_list_wtpl ;; shell) shell_list_wtpl ;; - *) check_args '1' '0' '[format]' + *) check_args '1' '0' '[FORMAT]' esac diff --git a/bin/v-list-web-templates-nginx b/bin/v-list-web-templates-nginx index aa4993dd..4b6b0f64 100755 --- a/bin/v-list-web-templates-nginx +++ b/bin/v-list-web-templates-nginx @@ -1,6 +1,6 @@ #!/bin/bash # info: listing nginx templates -# options: [format] +# options: [FORMAT] # # The function for obtaining the list of nginx templates available to a user. @@ -56,7 +56,7 @@ case $format in json) json_list_wtpl ;; plain) nohead=1; shell_list_wtpl ;; shell) shell_list_wtpl ;; - *) check_args '1' '0' '[format]' + *) check_args '1' '0' '[FORMAT]' esac diff --git a/bin/v-rebuild-cron-jobs b/bin/v-rebuild-cron-jobs index 84f5fa6b..f27b6ccf 100755 --- a/bin/v-rebuild-cron-jobs +++ b/bin/v-rebuild-cron-jobs @@ -1,6 +1,6 @@ #!/bin/bash # info: rebuild cron jobs -# options: user [restart] +# options: USER [RESTART] # # The function rebuilds system cron config file for specified user. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [restart]' +check_args '1' "$#" 'USER [RESTART]' validate_format 'user' is_system_enabled "$CRON_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-rebuild-databases b/bin/v-rebuild-databases index 2052fa5c..eee88915 100755 --- a/bin/v-rebuild-databases +++ b/bin/v-rebuild-databases @@ -1,6 +1,6 @@ #!/bin/bash # info: rebuild databases -# options: user +# options: USER # # The function for rebuilding of all databases of a single user. @@ -22,7 +22,7 @@ source $VESTA/func/db.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$DB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-rebuild-dns-domains b/bin/v-rebuild-dns-domains index 1f489216..aaec4e98 100755 --- a/bin/v-rebuild-dns-domains +++ b/bin/v-rebuild-dns-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: rebuild dns domains -# options: user [restart] +# options: USER [RESTART] # # The function rebuilds BIND configuration files for all dns domains. @@ -23,7 +23,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [restart]' +check_args '1' "$#" 'USER [RESTART]' validate_format 'user' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-rebuild-mail-domains b/bin/v-rebuild-mail-domains index 2771f097..db539ad6 100755 --- a/bin/v-rebuild-mail-domains +++ b/bin/v-rebuild-mail-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: rebuild mail domains -# options: user +# options: USER # # The function rebuilds EXIM configuration files for all mail domains. @@ -22,7 +22,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-rebuild-user b/bin/v-rebuild-user index 356c9dad..ee71c53a 100755 --- a/bin/v-rebuild-user +++ b/bin/v-rebuild-user @@ -1,6 +1,6 @@ #!/bin/bash # info: rebuild system user -# options: user [restart] +# options: USER [RESTART] # # The function rebuilds system user account. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [restart]' +check_args '1' "$#" 'USER [RESTART]' validate_format 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" diff --git a/bin/v-rebuild-web-domains b/bin/v-rebuild-web-domains index 107c2621..5534b3c5 100755 --- a/bin/v-rebuild-web-domains +++ b/bin/v-rebuild-web-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: rebuild dns domains -# options: user [restart] +# options: USER [RESTART] # # The function rebuilds BIND configuration files for all dns domains. @@ -24,7 +24,7 @@ source $VESTA/func/ip.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [restart]' +check_args '1' "$#" 'USER [RESTART]' validate_format 'user' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-restart-cron b/bin/v-restart-cron index 3499a3f2..458aa4bf 100755 --- a/bin/v-restart-cron +++ b/bin/v-restart-cron @@ -1,6 +1,6 @@ #!/bin/bash # info: restart cron service -# options: none +# options: NONE # # The function tells crond service to reread its configuration files. diff --git a/bin/v-restart-dns b/bin/v-restart-dns index b9937373..8fc51dd2 100755 --- a/bin/v-restart-dns +++ b/bin/v-restart-dns @@ -1,6 +1,6 @@ #!/bin/bash # info: restart dns service -# options: none +# options: NONE # # The function tells BIND service to reload dns zone files. diff --git a/bin/v-restart-mail b/bin/v-restart-mail index 6c302179..d1467be1 100755 --- a/bin/v-restart-mail +++ b/bin/v-restart-mail @@ -1,6 +1,6 @@ #!/bin/bash # info: restart mail service -# options: none +# options: NONE # # The function tells Exim service to reload configuration files. diff --git a/bin/v-restart-web b/bin/v-restart-web index 64d00d71..7ad08338 100755 --- a/bin/v-restart-web +++ b/bin/v-restart-web @@ -1,6 +1,6 @@ #!/bin/bash # info: restart dns service -# options: none +# options: NONE # # The function tells BIND service to reload dns zone files. diff --git a/bin/v-restore-user b/bin/v-restore-user index 23568972..84cc3e38 100755 --- a/bin/v-restore-user +++ b/bin/v-restore-user @@ -1,6 +1,6 @@ #!/bin/bash # info: restore user -# options: user backup +# options: USER BACKUP # # The function for resotring user from backup. diff --git a/bin/v-search-domain-owner b/bin/v-search-domain-owner index c09a1c94..21ed0b09 100755 --- a/bin/v-search-domain-owner +++ b/bin/v-search-domain-owner @@ -1,6 +1,6 @@ #!/bin/bash # info: search domain owner -# options: domain [type] +# options: DOMAIN [TYPE] # # The function that allows to find user objects. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'domain [type]' +check_args '1' "$#" 'DOMAIN [TYPE]' #----------------------------------------------------------# diff --git a/bin/v-search-object b/bin/v-search-object index 0cc2e47b..7c4185ad 100755 --- a/bin/v-search-object +++ b/bin/v-search-object @@ -1,6 +1,6 @@ #!/bin/bash # info: search objects -# options: object [format] +# options: OBJECT [FORMAT] # # The function that allows to find system objects. @@ -70,7 +70,7 @@ shell_list_search() { # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'object [format]' +check_args '1' "$#" 'OBJECT [FORMAT]' validate_format 'object' @@ -243,7 +243,7 @@ case $format in plain) nohead=1; shell_list_search ;; shell) fields='$USER~$TYPE~$KEY~$RESULT~$ALIAS'; shell_list |column -t -s '~' ;; - *) check_args '1' '0' 'object [format]' + *) check_args '1' '0' 'OBJECT [FORMAT]' esac rm $conf diff --git a/bin/v-search-user-object b/bin/v-search-user-object index 9d956c70..86e4bbcf 100755 --- a/bin/v-search-user-object +++ b/bin/v-search-user-object @@ -1,6 +1,6 @@ #!/bin/bash # info: search objects -# options: user object [format] +# options: USER OBJECT [FORMAT] # # The function that allows to find user objects. @@ -71,7 +71,7 @@ shell_list_search() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user object [format]' +check_args '2' "$#" 'USER OBJECT [FORMAT]' validate_format 'user' 'object' is_object_valid 'user' 'USER' "$user" @@ -243,7 +243,7 @@ case $format in plain) nohead=1; shell_list_search ;; shell) fields='$USER~$TYPE~$KEY~$RESULT~$ALIAS'; shell_list |column -t -s '~' ;; - *) check_args '2' '0' 'user object [format]' + *) check_args '2' '0' 'USER OBJECT [FORMAT]' esac rm $conf diff --git a/bin/v-suspend-cron-job b/bin/v-suspend-cron-job index 43d118c8..a9c29019 100755 --- a/bin/v-suspend-cron-job +++ b/bin/v-suspend-cron-job @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend cron job -# options: user job [restart] +# options: USER JOB [RESTART] # # The function suspends a certain job of the cron scheduler. @@ -23,7 +23,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user job [restart]' +check_args '2' "$#" 'USER JOB [RESTART]' validate_format 'user' 'job' is_object_valid 'user' 'USER' "$user" is_object_valid 'cron' 'JOB' "$job" diff --git a/bin/v-suspend-cron-jobs b/bin/v-suspend-cron-jobs index 6d450555..5dadc5c6 100755 --- a/bin/v-suspend-cron-jobs +++ b/bin/v-suspend-cron-jobs @@ -1,6 +1,6 @@ #!/bin/bash # info: Suspending sys cron jobs -# options: user [restart] +# options: USER [RESTART] # # The function suspends all user cron jobs. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-suspend-database b/bin/v-suspend-database index 84b943db..7153182c 100755 --- a/bin/v-suspend-database +++ b/bin/v-suspend-database @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend database -# options: user database +# options: USER DATABASE # # The function for suspending a certain user database. @@ -23,7 +23,7 @@ source $VESTA/func/db.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user database' +check_args '2' "$#" 'USER DATABASE' validate_format 'user' 'database' is_system_enabled "$DB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-suspend-database-server b/bin/v-suspend-database-server index 2854dae6..51d3e428 100755 --- a/bin/v-suspend-database-server +++ b/bin/v-suspend-database-server @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend database server -# options: type host +# options: TYPE HOST # # The function for suspending a database server. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'type host' +check_args '2' "$#" 'TYPE HOST' validate_format 'type' 'host' is_system_enabled "$DB_SYSTEM" is_object_valid "../../conf/$type" 'HOST' "$host" diff --git a/bin/v-suspend-databases b/bin/v-suspend-databases index 8ff792e9..e3ed49bb 100755 --- a/bin/v-suspend-databases +++ b/bin/v-suspend-databases @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend databases -# options: user +# options: USER # # The function for suspending of all databases of a single user. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$DB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-suspend-dns-domain b/bin/v-suspend-dns-domain index 7ce528d8..7f061805 100755 --- a/bin/v-suspend-dns-domain +++ b/bin/v-suspend-dns-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend dns domain -# options: user domain [restart] +# options: USER DOMAIN [RESTART] # # The function suspends a certain user's domain. @@ -24,7 +24,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [restart]' +check_args '2' "$#" 'USER DOMAIN [RESTART]' validate_format 'user' 'domain' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-suspend-dns-domain-record b/bin/v-suspend-dns-domain-record index d7f1b517..bad2e6cf 100755 --- a/bin/v-suspend-dns-domain-record +++ b/bin/v-suspend-dns-domain-record @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend dns domain record -# options: user domain id [restart] +# options: USER DOMAIN ID [RESTART] # # The function suspends a certain domain record. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain id [restart]' +check_args '3' "$#" 'USER DOMAIN ID [RESTART]' validate_format 'user' 'domain' 'id' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-suspend-dns-domains b/bin/v-suspend-dns-domains index 7bb2e8c1..fa64aaed 100755 --- a/bin/v-suspend-dns-domains +++ b/bin/v-suspend-dns-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend dns domains -# options: user [restart] +# options: USER [RESTART] # # The function suspends all user's DNS domains. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [restart]' +check_args '1' "$#" 'USER [RESTART]' validate_format 'user' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-suspend-mail-account b/bin/v-suspend-mail-account index 1944612f..6d1f9047 100755 --- a/bin/v-suspend-mail-account +++ b/bin/v-suspend-mail-account @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend mail account -# options: user domain account +# options: USER DOMAIN ACCOUNT # # The function suspends mail account. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain account' +check_args '3' "$#" 'USER DOMAIN ACCOUNT' validate_format 'user' 'domain' 'account' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-suspend-mail-accounts b/bin/v-suspend-mail-accounts index 789c3492..e0b439cc 100755 --- a/bin/v-suspend-mail-accounts +++ b/bin/v-suspend-mail-accounts @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend all mail domain accounts -# options: user domain +# options: USER DOMAIN # # The function suspends all mail domain accounts. @@ -24,7 +24,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-suspend-mail-domain b/bin/v-suspend-mail-domain index ef60bc22..7fdc60f2 100755 --- a/bin/v-suspend-mail-domain +++ b/bin/v-suspend-mail-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend mail domain -# options: user domain +# options: USER DOMAIN # # The function suspends mail domain. @@ -25,7 +25,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-suspend-mail-domains b/bin/v-suspend-mail-domains index 99ee8e46..60fba66b 100755 --- a/bin/v-suspend-mail-domains +++ b/bin/v-suspend-mail-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend mail domains -# options: user +# options: USER # # The function suspends all user's MAIL domains. @@ -22,7 +22,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-suspend-user b/bin/v-suspend-user index f159b783..16c9569a 100755 --- a/bin/v-suspend-user +++ b/bin/v-suspend-user @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend user -# options: user [restart] +# options: USER [RESTART] # # The function suspends a certain user and all his objects. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [restart]' +check_args '1' "$#" 'USER [RESTART]' validate_format 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" diff --git a/bin/v-suspend-web-domain b/bin/v-suspend-web-domain index 349be3e0..de707089 100755 --- a/bin/v-suspend-web-domain +++ b/bin/v-suspend-web-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend web domain -# options: user domain +# options: USER DOMAIN # # The function for suspending the site's operation. After blocking it all # visitors will be redirected to a web page explaining the reason of suspend. @@ -28,7 +28,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [restart]' +check_args '2' "$#" 'USER DOMAIN [RESTART]' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-suspend-web-domains b/bin/v-suspend-web-domains index 90a85f8e..7fa0d83b 100755 --- a/bin/v-suspend-web-domains +++ b/bin/v-suspend-web-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: suspend web domains -# options: user [restart] +# options: USER [RESTART] # # The function of suspending all user's sites. @@ -23,7 +23,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [restart]' +check_args '1' "$#" 'USER [RESTART]' validate_format 'user' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-unsuspend-cron-job b/bin/v-unsuspend-cron-job index 64e6d62b..23c45bba 100755 --- a/bin/v-unsuspend-cron-job +++ b/bin/v-unsuspend-cron-job @@ -1,6 +1,6 @@ #!/bin/bash # info: unuspend cron job -# options: user job [restart] +# options: USER JOB [RESTART] # # The function unsuspen certain cron job. @@ -23,7 +23,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user job [restart]' +check_args '2' "$#" 'USER JOB [RESTART]' validate_format 'user' 'job' 'restart' is_object_valid 'user' 'USER' "$user" is_object_valid 'cron' 'JOB' "$job" diff --git a/bin/v-unsuspend-cron-jobs b/bin/v-unsuspend-cron-jobs index b05d0095..066b6d62 100755 --- a/bin/v-unsuspend-cron-jobs +++ b/bin/v-unsuspend-cron-jobs @@ -1,6 +1,6 @@ #!/bin/bash # info: unuspend sys cron -# options: user [restart] +# options: USER [RESTART] # # The function unsuspends all suspended cron jobs. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [restart]' +check_args '1' "$#" 'USER [RESTART]' validate_format 'user' is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-unsuspend-database b/bin/v-unsuspend-database index d700dd0a..b6229758 100755 --- a/bin/v-unsuspend-database +++ b/bin/v-unsuspend-database @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend database -# options: user database +# options: USER DATABASE # # The function for unsuspending database. @@ -23,7 +23,7 @@ source $VESTA/func/db.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user database' +check_args '2' "$#" 'USER DATABASE' validate_format 'user' 'database' is_system_enabled "$DB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-unsuspend-database-server b/bin/v-unsuspend-database-server index 387e1cf1..8c98945b 100755 --- a/bin/v-unsuspend-database-server +++ b/bin/v-unsuspend-database-server @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend database server -# options: type host +# options: TYPE HOST # # The function for unsuspending a database server. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'type host' +check_args '2' "$#" 'TYPE HOST' validate_format 'type' 'host' is_system_enabled "$DB_SYSTEM" is_object_valid "../../conf/$type" 'HOST' "$host" diff --git a/bin/v-unsuspend-databases b/bin/v-unsuspend-databases index 5d48a209..d036cadb 100755 --- a/bin/v-unsuspend-databases +++ b/bin/v-unsuspend-databases @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend databases -# options: user +# options: USER # # The function for unsuspending all user's databases. @@ -22,7 +22,7 @@ source $VESTA/func/db.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$DB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-unsuspend-dns-domain b/bin/v-unsuspend-dns-domain index 9cfdf212..eb0cabf7 100755 --- a/bin/v-unsuspend-dns-domain +++ b/bin/v-unsuspend-dns-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend dns domain -# options: user domain +# options: USER DOMAIN # # The function unsuspends a certain user's domain. @@ -24,7 +24,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-unsuspend-dns-domain-record b/bin/v-unsuspend-dns-domain-record index a95a75d9..66e1b93c 100755 --- a/bin/v-unsuspend-dns-domain-record +++ b/bin/v-unsuspend-dns-domain-record @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend dns domain record -# options: user domain id [restart] +# options: USER DOMAIN ID [RESTART] # # The function unsuspends a certain domain record. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain id [restart]' +check_args '3' "$#" 'USER DOMAIN ID [RESTART]' validate_format 'user' 'domain' 'id' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-unsuspend-dns-domains b/bin/v-unsuspend-dns-domains index 468b41a0..54173de4 100755 --- a/bin/v-unsuspend-dns-domains +++ b/bin/v-unsuspend-dns-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend dns domains -# options: user [restart] +# options: USER [RESTART] # # The function unsuspends all user's DNS domains. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [restart]' +check_args '1' "$#" 'USER [RESTART]' validate_format 'user' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-unsuspend-mail-account b/bin/v-unsuspend-mail-account index 2cf7216a..8c2179d9 100755 --- a/bin/v-unsuspend-mail-account +++ b/bin/v-unsuspend-mail-account @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend mail account -# options: user domain account +# options: USER DOMAIN ACCOUNT # # The function unsuspends mail account. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'user domain account' +check_args '3' "$#" 'USER DOMAIN ACCOUNT' validate_format 'user' 'domain' 'account' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-unsuspend-mail-accounts b/bin/v-unsuspend-mail-accounts index e71f5790..f3deb175 100755 --- a/bin/v-unsuspend-mail-accounts +++ b/bin/v-unsuspend-mail-accounts @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend all mail domain accounts -# options: user domain +# options: USER DOMAIN # # The function unsuspends all mail domain accounts. @@ -24,7 +24,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-unsuspend-mail-domain b/bin/v-unsuspend-mail-domain index 7f2504d5..c6374a0d 100755 --- a/bin/v-unsuspend-mail-domain +++ b/bin/v-unsuspend-mail-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend mail domain -# options: user domain +# options: USER DOMAIN # # The function unsuspends mail domain. @@ -25,7 +25,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-unsuspend-mail-domains b/bin/v-unsuspend-mail-domains index a1c37bc6..08161d4f 100755 --- a/bin/v-unsuspend-mail-domains +++ b/bin/v-unsuspend-mail-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend mail domains -# options: user +# options: USER # # The function unsuspends all user's MAIL domains. @@ -22,7 +22,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-unsuspend-user b/bin/v-unsuspend-user index 10ecbc23..4a0b3e14 100755 --- a/bin/v-unsuspend-user +++ b/bin/v-unsuspend-user @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend user -# options: user [restart] +# options: USER [RESTART] # # The function unsuspends user and all his objects. @@ -22,7 +22,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_object_valid 'user' 'USER' "$user" if [ "$user" = 'admin' ]; then diff --git a/bin/v-unsuspend-web-domain b/bin/v-unsuspend-web-domain index 85d1dbcd..b62fa1ae 100755 --- a/bin/v-unsuspend-web-domain +++ b/bin/v-unsuspend-web-domain @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend web domain -# options: user domain +# options: USER DOMAIN # # The function of unsuspending the domain. @@ -25,7 +25,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain [restart]' +check_args '2' "$#" 'USER DOMAIN [RESTART]' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-unsuspend-web-domains b/bin/v-unsuspend-web-domains index 474766fa..dda4a09c 100755 --- a/bin/v-unsuspend-web-domains +++ b/bin/v-unsuspend-web-domains @@ -1,6 +1,6 @@ #!/bin/bash # info: unsuspend web domains -# options: user [restart] +# options: USER [RESTART] # # The function of unsuspending all user's sites. @@ -23,7 +23,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user [restart]' +check_args '1' "$#" 'USER [RESTART]' validate_format 'user' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-database-disk b/bin/v-update-database-disk index 528a031c..695fb8c2 100755 --- a/bin/v-update-database-disk +++ b/bin/v-update-database-disk @@ -1,6 +1,6 @@ #!/bin/bash # info: update database disk usage -# options: user database +# options: USER DATABASE # # The function recalculates disk usage for speciefic database. @@ -23,7 +23,7 @@ source $VESTA/func/db.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user database' +check_args '2' "$#" 'USER DATABASE' validate_format 'user' 'database' is_system_enabled "$DB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-databases-disk b/bin/v-update-databases-disk index 1031a1b0..c434be05 100755 --- a/bin/v-update-databases-disk +++ b/bin/v-update-databases-disk @@ -1,6 +1,6 @@ #!/bin/bash # info: update databases disk usage -# options: user +# options: USER # # The function recalculates disk usage for all user databases. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$DB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-mail-domain-disk b/bin/v-update-mail-domain-disk index 8919afed..6d82aed0 100755 --- a/bin/v-update-mail-domain-disk +++ b/bin/v-update-mail-domain-disk @@ -1,6 +1,6 @@ #!/bin/bash # info: update mail domain disk usage -# options: user domain +# options: USER DOMAIN # # The function updates domain disk usage. @@ -24,7 +24,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-mail-domains-disk b/bin/v-update-mail-domains-disk index d2c835c7..f711dabe 100755 --- a/bin/v-update-mail-domains-disk +++ b/bin/v-update-mail-domains-disk @@ -1,6 +1,6 @@ #!/bin/bash # info: calculate disk usage for all mail domains -# options: user +# options: USER # # The function calculates disk usage for all mail domains. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$MAIL_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-sys-ip b/bin/v-update-sys-ip index c34387e3..da5bca6f 100755 --- a/bin/v-update-sys-ip +++ b/bin/v-update-sys-ip @@ -1,6 +1,6 @@ #!/bin/bash # info: update system ip -# options: [user] [ip_status] +# options: [USER] [IP_STATUS] # # The function scans configured ip in the system and register them with vesta # internal database. This call is intended for use on vps servers, where ip is @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '0' "$#" '[user] [ip_status]' +check_args '0' "$#" '[USER] [IP_STATUS]' validate_format 'user' 'ip_status' is_object_valid 'user' 'USER' "$user" "$user" diff --git a/bin/v-update-sys-queue b/bin/v-update-sys-queue index 54b4d196..04868006 100755 --- a/bin/v-update-sys-queue +++ b/bin/v-update-sys-queue @@ -1,6 +1,6 @@ #!/bin/bash # info: update system queue -# options: pipe +# options: PIPE # # This function is responsible queue processing. Restarts of services, # scheduled backups, web log parsing and other heavy resource consuming @@ -31,7 +31,7 @@ PATH=$PATH:$BIN # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'queue' +check_args '1' "$#" 'QUEUE' #----------------------------------------------------------# @@ -47,7 +47,7 @@ case $queue in backup) bash $VESTA/data/queue/backup.pipe;; disk) bash $VESTA/data/queue/disk.pipe;; traffic) bash $VESTA/data/queue/traffic.pipe;; - *) check_args '1' '0' 'queue' + *) check_args '1' '0' 'QUEUE' esac diff --git a/bin/v-update-sys-rrd b/bin/v-update-sys-rrd index e264d4fc..8b6aba36 100755 --- a/bin/v-update-sys-rrd +++ b/bin/v-update-sys-rrd @@ -1,6 +1,6 @@ #!/bin/bash # info: update system rrd charts -# options: none +# options: NONE # # The script is wrapper for all rrd functions. It updates all # v-update-sys-rrd_* at once. diff --git a/bin/v-update-sys-rrd-ftp b/bin/v-update-sys-rrd-ftp index e79623bc..4436f282 100755 --- a/bin/v-update-sys-rrd-ftp +++ b/bin/v-update-sys-rrd-ftp @@ -1,6 +1,6 @@ #!/bin/bash # info: update ftp rrd -# options: period +# options: PERIOD # # The function is for updating ftpd rrd database and graphic. diff --git a/bin/v-update-sys-rrd-httpd b/bin/v-update-sys-rrd-httpd index 297d1028..620631c6 100755 --- a/bin/v-update-sys-rrd-httpd +++ b/bin/v-update-sys-rrd-httpd @@ -1,6 +1,6 @@ #!/bin/bash # info: update httpd rrd -# options: period +# options: PERIOD # # The function is for updating apache rrd database and graphic. diff --git a/bin/v-update-sys-rrd-la b/bin/v-update-sys-rrd-la index 8879446b..da63024b 100755 --- a/bin/v-update-sys-rrd-la +++ b/bin/v-update-sys-rrd-la @@ -1,6 +1,6 @@ #!/bin/bash # info: update load average rrd -# options: period +# options: PERIOD # # The function is for updating load average rrd database and graphic. diff --git a/bin/v-update-sys-rrd-mem b/bin/v-update-sys-rrd-mem index 639db83b..85269b82 100755 --- a/bin/v-update-sys-rrd-mem +++ b/bin/v-update-sys-rrd-mem @@ -1,6 +1,6 @@ #!/bin/bash # info: update memory rrd -# options: period +# options: PERIOD # # The function is for updating memory rrd database and graphic. diff --git a/bin/v-update-sys-rrd-mysql b/bin/v-update-sys-rrd-mysql index 95baf5ee..bc74f504 100755 --- a/bin/v-update-sys-rrd-mysql +++ b/bin/v-update-sys-rrd-mysql @@ -1,6 +1,6 @@ #!/bin/bash # info: update MySQL rrd -# options: period +# options: PERIOD # # The function is for updating mysql rrd database and graphic. diff --git a/bin/v-update-sys-rrd-net b/bin/v-update-sys-rrd-net index b6639784..0c2ead68 100755 --- a/bin/v-update-sys-rrd-net +++ b/bin/v-update-sys-rrd-net @@ -1,6 +1,6 @@ #!/bin/bash # info: update network rrd -# options: period +# options: PERIOD # # The function is for updating network usage rrd database and graphic. diff --git a/bin/v-update-sys-rrd-nginx b/bin/v-update-sys-rrd-nginx index 6acd6433..6f2664e1 100755 --- a/bin/v-update-sys-rrd-nginx +++ b/bin/v-update-sys-rrd-nginx @@ -1,6 +1,6 @@ #!/bin/bash # info: update nginx rrd -# options: period +# options: PERIOD # # The function is for updating nginx rrd database and graphic. diff --git a/bin/v-update-sys-rrd-pgsql b/bin/v-update-sys-rrd-pgsql index 5a4e9f38..8aec1a28 100755 --- a/bin/v-update-sys-rrd-pgsql +++ b/bin/v-update-sys-rrd-pgsql @@ -1,6 +1,6 @@ #!/bin/bash # info: update PostgreSQL rrd -# options: period +# options: PERIOD # # The function is for updating postgresql rrd database and graphic. diff --git a/bin/v-update-sys-rrd-ssh b/bin/v-update-sys-rrd-ssh index 5fcb7e27..814f3878 100755 --- a/bin/v-update-sys-rrd-ssh +++ b/bin/v-update-sys-rrd-ssh @@ -1,6 +1,6 @@ #!/bin/bash # info: update ssh rrd -# options: period +# options: PERIOD # # The function is for updating ssh rrd database and graphic. diff --git a/bin/v-update-sys-vesta b/bin/v-update-sys-vesta index 6e31b0ed..788fcf57 100755 --- a/bin/v-update-sys-vesta +++ b/bin/v-update-sys-vesta @@ -1,6 +1,6 @@ #!/bin/bash # info: update vesta after rpm update -# options: version +# options: VERSION # # The function is runs as rpm update trigger. It pulls shell script from vesta # server and runs it. @@ -27,7 +27,7 @@ source $VESTA/func/main.sh #----------------------------------------------------------# # Checking arg number -check_args '1' "$#" 'version' +check_args '1' "$#" 'VERSION' #----------------------------------------------------------# diff --git a/bin/v-update-user-backups b/bin/v-update-user-backups index 628ea3c0..3604ae5b 100755 --- a/bin/v-update-user-backups +++ b/bin/v-update-user-backups @@ -1,6 +1,6 @@ #!/bin/bash # info: update user backups -# options: user +# options: USER # # The function rescan backup directory and updates backup database. @@ -174,7 +174,7 @@ check_ftp_connection(){ # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' is_system_enabled "$BACKUP_SYSTEM" validate_format 'user' is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-user-counters b/bin/v-update-user-counters index a90debbb..e81db53b 100755 --- a/bin/v-update-user-counters +++ b/bin/v-update-user-counters @@ -1,6 +1,6 @@ #!/bin/bash # info: update user usage counters -# options: user +# options: USER # # Function updates usage counters like U_WEB_DOMAINS, U_MAIL_ACCOUNTS, etc. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '0' "$#" 'user' +check_args '0' "$#" 'USER' if [ ! -z "$user" ]; then validate_format 'user' is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-user-disk b/bin/v-update-user-disk index 19d4812b..b567f124 100755 --- a/bin/v-update-user-disk +++ b/bin/v-update-user-disk @@ -1,6 +1,6 @@ #!/bin/bash # info: update user disk usage -# options: user +# options: USER # # The functions recalculates disk usage and updates database. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-user-package b/bin/v-update-user-package index 933a333a..780d21b2 100755 --- a/bin/v-update-user-package +++ b/bin/v-update-user-package @@ -1,6 +1,6 @@ #!/bin/bash # info: update user package -# options: pacakge +# options: PACAKGE # # The function propogates package to connected users. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'package' +check_args '1' "$#" 'PACKAGE' validate_format 'package' is_package_valid diff --git a/bin/v-update-user-stats b/bin/v-update-user-stats index b6294527..1ddf9565 100755 --- a/bin/v-update-user-stats +++ b/bin/v-update-user-stats @@ -1,6 +1,6 @@ #!/bin/bash # info: update user statistics -# options: user +# options: USER # # Function logs user parameters into statistics database. @@ -26,7 +26,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '0' "$#" 'user' +check_args '0' "$#" 'USER' if [ ! -z "$user" ]; then validate_format 'user' is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-web-domain-disk b/bin/v-update-web-domain-disk index 5e838a06..b820748f 100755 --- a/bin/v-update-web-domain-disk +++ b/bin/v-update-web-domain-disk @@ -1,6 +1,6 @@ #!/bin/bash # info: update disk usage for domain -# options: user domain +# options: USER DOMAIN # # The function recalculates disk usage for speciefic webdomain. @@ -24,7 +24,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-web-domain-stat b/bin/v-update-web-domain-stat index 58093590..cdaff937 100755 --- a/bin/v-update-web-domain-stat +++ b/bin/v-update-web-domain-stat @@ -1,6 +1,6 @@ #!/bin/bash # info: update domain statistics -# options: user domain +# options: USER DOMAIN # # The function runs log analyzer for speciefic webdomain. @@ -24,7 +24,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-web-domain-traff b/bin/v-update-web-domain-traff index e0be5b0d..6792cc37 100755 --- a/bin/v-update-web-domain-traff +++ b/bin/v-update-web-domain-traff @@ -1,6 +1,6 @@ #!/bin/bash # info: update domain bandwidth usage -# options: user domain +# options: USER DOMAIN # # The function recalculates bandwidth usage for speciefic domain. @@ -24,7 +24,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'user domain' +check_args '2' "$#" 'USER DOMAIN' validate_format 'user' 'domain' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-web-domains-disk b/bin/v-update-web-domains-disk index b30fdc79..baee1b2c 100755 --- a/bin/v-update-web-domains-disk +++ b/bin/v-update-web-domains-disk @@ -1,6 +1,6 @@ #!/bin/bash # info: update domains disk usage -# options: user +# options: USER # # The function recalculates disk usage for all user webdomains. @@ -21,7 +21,7 @@ source $VESTA/func/main.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-web-domains-stat b/bin/v-update-web-domains-stat index 61c7615c..ae948518 100755 --- a/bin/v-update-web-domains-stat +++ b/bin/v-update-web-domains-stat @@ -1,6 +1,6 @@ #!/bin/bash # info: update domains statistics -# options: user +# options: USER # # The function runs log analyzer usage for all user webdomains. @@ -22,7 +22,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-update-web-domains-traff b/bin/v-update-web-domains-traff index baf170db..386c09b5 100755 --- a/bin/v-update-web-domains-traff +++ b/bin/v-update-web-domains-traff @@ -1,6 +1,6 @@ #!/bin/bash # info: update domains bandwidth usage -# options: user +# options: USER # # The function recalculates bandwidth usage for all user webdomains. @@ -22,7 +22,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '1' "$#" 'user' +check_args '1' "$#" 'USER' validate_format 'user' is_system_enabled "$WEB_SYSTEM" is_object_valid 'user' 'USER' "$user" "$user" From 3e960b5b86e71819059567d97d59f0d6c845368a Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 28 Dec 2012 17:59:53 +0200 Subject: [PATCH 13/13] configs for roundcubemail password reset plugin --- install/0.9.7/rhel/roundcube-main.conf | 3 +++ install/0.9.7/rhel/roundcube-pw.conf | 33 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 install/0.9.7/rhel/roundcube-pw.conf diff --git a/install/0.9.7/rhel/roundcube-main.conf b/install/0.9.7/rhel/roundcube-main.conf index ebd34a60..a30df843 100644 --- a/install/0.9.7/rhel/roundcube-main.conf +++ b/install/0.9.7/rhel/roundcube-main.conf @@ -289,5 +289,8 @@ $rcmail_config['max_pagesize'] = 200; // mime magic database $rcmail_config['mime_magic'] = '/usr/share/misc/magic'; +// password reset plugin +$rcmail_config['plugins'] = array('password'); + // end of config file ?> diff --git a/install/0.9.7/rhel/roundcube-pw.conf b/install/0.9.7/rhel/roundcube-pw.conf new file mode 100644 index 00000000..0c82b1bc --- /dev/null +++ b/install/0.9.7/rhel/roundcube-pw.conf @@ -0,0 +1,33 @@ +