Просмотр исходного кода

Added documentation for WEB functions.

Serghey Rodin 14 лет назад
Родитель
Сommit
b9d399804a
43 измененных файлов с 279 добавлено и 42 удалено
  1. 10 1
      bin/v_add_web_domain
  2. 6 1
      bin/v_add_web_domain_alias
  3. 8 1
      bin/v_add_web_domain_cgi
  4. 6 1
      bin/v_add_web_domain_elog
  5. 6 1
      bin/v_add_web_domain_nginx
  6. 9 0
      bin/v_add_web_domain_ssl
  7. 9 1
      bin/v_add_web_domain_stat
  8. 5 1
      bin/v_add_web_domain_stat_auth
  9. 6 1
      bin/v_change_web_domain_ip
  10. 6 1
      bin/v_change_web_domain_sslcert
  11. 6 1
      bin/v_change_web_domain_tpl
  12. 8 1
      bin/v_delete_web_domain
  13. 6 1
      bin/v_delete_web_domain_alias
  14. 8 1
      bin/v_delete_web_domain_cgi
  15. 7 1
      bin/v_delete_web_domain_elog
  16. 5 1
      bin/v_delete_web_domain_nginx
  17. 5 1
      bin/v_delete_web_domain_ssl
  18. 6 1
      bin/v_delete_web_domain_stat
  19. 8 1
      bin/v_delete_web_domain_stat_auth
  20. 5 1
      bin/v_delete_web_domains
  21. 7 1
      bin/v_get_web_domain_value
  22. 6 1
      bin/v_list_web_domain
  23. 5 1
      bin/v_list_web_domain_ssl
  24. 5 1
      bin/v_list_web_domains
  25. 7 1
      bin/v_list_web_domains_alias
  26. 7 1
      bin/v_list_web_domains_elog
  27. 7 1
      bin/v_list_web_domains_nginx
  28. 7 1
      bin/v_list_web_domains_ssl
  29. 8 1
      bin/v_list_web_domains_stats
  30. 5 1
      bin/v_list_web_templates
  31. 4 0
      bin/v_list_web_templates_nginx
  32. 5 1
      bin/v_rebuild_web_domains
  33. 19 2
      bin/v_restart_web
  34. 7 1
      bin/v_suspend_web_domain
  35. 5 1
      bin/v_suspend_web_domains
  36. 5 1
      bin/v_unsuspend_web_domain
  37. 5 1
      bin/v_unsuspend_web_domains
  38. 5 1
      bin/v_update_web_domain_disk
  39. 5 1
      bin/v_update_web_domain_stat
  40. 5 1
      bin/v_update_web_domain_traff
  41. 5 1
      bin/v_update_web_domains_disk
  42. 5 1
      bin/v_update_web_domains_stat
  43. 5 1
      bin/v_update_web_domains_traff

+ 10 - 1
bin/v_add_web_domain

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

+ 6 - 1
bin/v_add_web_domain_alias

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

+ 8 - 1
bin/v_add_web_domain_cgi

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

+ 6 - 1
bin/v_add_web_domain_elog

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

+ 6 - 1
bin/v_add_web_domain_nginx

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

+ 9 - 0
bin/v_add_web_domain_ssl

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

+ 9 - 1
bin/v_add_web_domain_stat

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

+ 5 - 1
bin/v_add_web_domain_stat_auth

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

+ 6 - 1
bin/v_change_web_domain_ip

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

+ 6 - 1
bin/v_change_web_domain_sslcert

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

+ 6 - 1
bin/v_change_web_domain_tpl

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

+ 8 - 1
bin/v_delete_web_domain

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

+ 6 - 1
bin/v_delete_web_domain_alias

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

+ 8 - 1
bin/v_delete_web_domain_cgi

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

+ 7 - 1
bin/v_delete_web_domain_elog

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

+ 5 - 1
bin/v_delete_web_domain_nginx

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

+ 5 - 1
bin/v_delete_web_domain_ssl

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

+ 6 - 1
bin/v_delete_web_domain_stat

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

+ 8 - 1
bin/v_delete_web_domain_stat_auth

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

+ 5 - 1
bin/v_delete_web_domains

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

+ 7 - 1
bin/v_get_web_domain_value

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

+ 6 - 1
bin/v_list_web_domain

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

+ 5 - 1
bin/v_list_web_domain_ssl

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

+ 5 - 1
bin/v_list_web_domains

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

+ 7 - 1
bin/v_list_web_domains_alias

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

+ 7 - 1
bin/v_list_web_domains_elog

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

+ 7 - 1
bin/v_list_web_domains_nginx

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

+ 7 - 1
bin/v_list_web_domains_ssl

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

+ 8 - 1
bin/v_list_web_domains_stats

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

+ 5 - 1
bin/v_list_web_templates

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

+ 4 - 0
bin/v_list_web_templates_nginx

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

+ 5 - 1
bin/v_rebuild_web_domains

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

+ 19 - 2
bin/v_restart_web

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

+ 7 - 1
bin/v_suspend_web_domain

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

+ 5 - 1
bin/v_suspend_web_domains

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

+ 5 - 1
bin/v_unsuspend_web_domain

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

+ 5 - 1
bin/v_unsuspend_web_domains

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

+ 5 - 1
bin/v_update_web_domain_disk

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

+ 5 - 1
bin/v_update_web_domain_stat

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

+ 5 - 1
bin/v_update_web_domain_traff

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

+ 5 - 1
bin/v_update_web_domains_disk

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

+ 5 - 1
bin/v_update_web_domains_stat

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

+ 5 - 1
bin/v_update_web_domains_traff

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