Added documentation for WEB functions.

This commit is contained in:
Serghey Rodin 2012-01-12 15:03:54 +02:00
commit b9d399804a
43 changed files with 279 additions and 42 deletions

View file

@ -1,5 +1,14 @@
#!/bin/bash
# info: adding web domain
# info: add web domain
# options: user domain ip [template]
#
# 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
# www.domain.tld type will be automatically assigned to the domain. If ip have
# assocated dns name, this domain will also get the alias domain-tpl.$ipname.
# An alias with the ip name is useful during the site testing while dns isn't
# moved to a server yet.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: adding web domain alias
# info: add web domain alias
# options: user domain alias
#
# The call is intended for adding aliases to a domain (it is also called
# "domain parking"). The function supports wildcards *.domain.tpl.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,12 @@
#!/bin/bash
# info: adding cgi support for domain
# info: add cgi support for 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
# cases, when temporary cgi support is necessary, for other cases use of
# templates is recommended.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: adding error log for domain
# info: add error logging for domain
# options: user domain
#
# The function enables a separate ErrorLog file for a domain, accessible for
# reading by users.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: adding nginx support
# info: add webdomain nginx support
# options: user domain
#
# The function enables nginx support for a domain. It can significantly improve
# website speed.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,14 @@
#!/bin/bash
# info: adding ssl for domain
# options: user domain ssl_dir [ssl_home]
#
# 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
# domain.tld.crt and its key domain.tld.key are mandatory. Certificate
# authority domain.tld.ca file is optional. If home directory parameter
# (ssl_home) is not set, https domain uses public_shtml as separate
# documentroot directory.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,13 @@
#!/bin/bash
# info: adding stats for domain
# info: add log analyzer to generate domain statitics
# 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
# the domain statistics use http://domain.tld/vstats/ link. Access this page
# is not protected by default. If you want to secure it with passwords you
# should use v_add_web_domain_stat_auth script.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: adding web domain
# info: add password protection to web domain statistics
# options: user domain auth_user auth_password
#
# The call is used for securing the web statistics page.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: changing domain ip
# info: change web domain ip address
# options: user domain ip
#
# 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.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: changing domain ssl certificate
# info: change domain ssl certificate
# options: user domain ssl_dir
#
# The function changes SSL domain certificate and the key. If ca file present
# it will be replaced as well.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: changing domain template
# info: change web domain template
# options: user domain template
#
# The function changes template of httpd.conf configuration file. The content
# of webdomain directories remains untouched.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,12 @@
#!/bin/bash
# info: deliting web domain
# info: delete web 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
# not fully supported by "undo" function, so the data recovery is possible
# only with a help of reserve copy.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: deliting web domain alias
# info: delete web domain alias
# options user domain alias
#
# The function of deleting the alias domain (parked domain). By this call
# default www aliase can be removed as well.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,12 @@
#!/bin/bash
# info: deliting cgi for domain
# info: delete web domain cgi support
# 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
# temporary use (for lightening the consequences of DDoS, for example);
# otherwise it is preferable to use templates.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,11 @@
#!/bin/bash
# info: deleting error log for domain
# info: delete web domain error loggin support
# options: user domain
#
# The function of disabling error logging feature. It comments ErrorLog
# direcitve in apache or/and nginx configuration. The data already collected
# remains untouched.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: deleting web domain nginx config
# info: deleting web domain nginx configuration
# options: user domain
#
# The function of deleting the virtualhost nginx configuration.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: deliting web domain ssl
# info: delete web domain ssl support
# options: user domain
#
# The function disable https support and deletes SSL certificates.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: adding web domain
# info: delete web domain statistics
# options: user domain
#
# The function of deleting site's system of statistics. Its type is
# automatically chooses from client's configuration file.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,12 @@
#!/bin/bash
# info: adding web domain
# info: disable webdomain stats authentication support
# options: user domain [auth_user]
#
# The function removes authentication of statistics system. If the script is
# called without naming a certain user, all users will be removed. After
# deleting all of them statistics will be accessible for view without an
# authentication.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: deleteing all user web domains
# info: delete web domains
# options: user
#
# The function deteles all user's webdomains.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,11 @@
#!/bin/bash
# info: Getting web domain value
# info: get web domain value
# 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
# raw form; output formats aren't supported.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: listing web domain
# info: list web domain
# 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.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: listing web ssl certificate
# info: list web domain ssl certificate
# options: user domain [format]
#
# The function of obtaining domain ssl files.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: listing web domains
# info: list web domains
# options user [format]
#
# The function of obtaining the list of all user domains.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,11 @@
#!/bin/bash
# info: listing web domains
# info: list web domains and alias key
# 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
# v_list_web_domains call in the shell format.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,11 @@
#!/bin/bash
# info: listing web domain
# info: list web domains and elog key
# 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
# applying v_list_web_domains call in the shell format.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,11 @@
#!/bin/bash
# info: listing web domains
# info: list web domains and nginx key
# 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
# applying v_list_web_domains call in the shell format.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,11 @@
#!/bin/bash
# info: listing web domain
# info: list web domains and alias key
# 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
# v_list_web_domains call in the shell format.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,12 @@
#!/bin/bash
# info: listing web domain
# info: list web domains and stats key
# options: user [format]
#
# The function for obtaining the list of domains with statistics parameter
# displayed, including authentication settings. This call was arranged for
# filling in the lack of information by applying v_list_web_domains call in
# the shell format.
#----------------------------------------------------------#
# Variable&Function #

View file

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

View file

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

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: rebuilding web domains
# info: rebuild dns domains
# options: user
#
# The function rebuilds BIND configuration files for all dns domains.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,6 +1,13 @@
#!/bin/bash
# Internal vesta function
# web system restart
# info: restart dns service
# options: none
#
# The function tells BIND service to reload dns zone files.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Importing variables
source $VESTA/conf/vars.conf
@ -23,6 +30,11 @@ nginx() {
fi
}
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Checking system
if [ "$WEB_SYSTEM" = 'apache' ]; then
apache
@ -32,5 +44,10 @@ if [ "$PROXY_SYSTEM" = 'nginx' ]; then
nginx
fi
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
# Logging
exit

View file

@ -1,5 +1,11 @@
#!/bin/bash
# info: suspening web domain (with ssl)
# info: suspend web 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.
# By blocking the site the content of all its directories remains untouched.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: suspening web domains (with ssl)
# info: suspend web domains
# options: user
#
# The function of suspending all user's sites.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: unsuspening web domain (with ssl)
# info: unsuspend web domain
# options: user domain
#
# The function of unsuspending the domain.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: unsuspening web domain (with ssl)
# info: unsuspend web domains
# options: user
#
# The function of unsuspending all user's sites.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: updating disk usage for domain
# info: update disk usage for domain
# options: user domain
#
# The function recalculates disk usage for speciefic webdomain.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: updating domain web statistics
# info: update domain statistics
# options: user domain
#
# The function runs log analyzer for speciefic webdomain.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: updating traffic usage for domain
# info: update domain bandwidth usage
# options: user domain
#
# The function recalculates bandwidth usage for speciefic domain.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: updating disk usage for all user domains
# info: update domains disk usage
# options: user
#
# The function recalculates disk usage for all user webdomains.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: updating web statistics for all domains
# info: update domains statistics
# options: user
#
# The function runs log analyzer usage for all user webdomains.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: updating traffic usage for domains
# info: update domains bandwidth usage
# options: user
#
# The function recalculates bandwidth usage for all user webdomains.
#----------------------------------------------------------#
# Variable&Function #