Merge changes from upstream

I'm a little angry
This commit is contained in:
ZonD Eighty 2012-12-28 23:31:02 +04:00
commit 2b16d9bd83
254 changed files with 24485 additions and 24094 deletions

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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'

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -1,6 +1,6 @@
#!/bin/bash
# info: backup all users
# options: none
# options: NONE
#
# The function backups all system users.

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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'

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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'

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

49
bin/v-get-mail-account-value Executable file
View file

@ -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

47
bin/v-get-mail-domain-value Executable file
View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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

Some files were not shown because too many files have changed in this diff Show more