Browse Source

Merge branch 'cli-scripts-comments' into refactor/scripts

Kristan Kenney 5 years ago
parent
commit
2af176e2f3
100 changed files with 280 additions and 31 deletions
  1. 1 0
      bin/v-acknowledge-user-notification
  2. 3 0
      bin/v-add-backup-host
  3. 1 0
      bin/v-add-cron-hestia-autoupdate
  4. 4 1
      bin/v-add-cron-job
  5. 1 0
      bin/v-add-cron-letsencrypt-job
  6. 4 1
      bin/v-add-cron-reports
  7. 1 0
      bin/v-add-cron-restart-job
  8. 4 1
      bin/v-add-database
  9. 4 1
      bin/v-add-database-host
  10. 3 0
      bin/v-add-dns-domain
  11. 3 0
      bin/v-add-dns-on-web-alias
  12. 3 0
      bin/v-add-dns-record
  13. 3 0
      bin/v-add-domain
  14. 3 0
      bin/v-add-firewall-ban
  15. 3 0
      bin/v-add-firewall-chain
  16. 1 0
      bin/v-add-firewall-ipset
  17. 3 0
      bin/v-add-firewall-rule
  18. 4 1
      bin/v-add-fs-archive
  19. 3 0
      bin/v-add-fs-directory
  20. 3 0
      bin/v-add-fs-file
  21. 3 0
      bin/v-add-letsencrypt-domain
  22. 2 1
      bin/v-add-letsencrypt-host
  23. 4 1
      bin/v-add-letsencrypt-user
  24. 3 0
      bin/v-add-mail-account
  25. 3 0
      bin/v-add-mail-account-alias
  26. 3 0
      bin/v-add-mail-account-autoreply
  27. 3 0
      bin/v-add-mail-account-forward
  28. 3 0
      bin/v-add-mail-account-fwd-only
  29. 3 0
      bin/v-add-mail-domain
  30. 3 0
      bin/v-add-mail-domain-antispam
  31. 3 0
      bin/v-add-mail-domain-antivirus
  32. 3 0
      bin/v-add-mail-domain-catchall
  33. 3 0
      bin/v-add-mail-domain-dkim
  34. 1 0
      bin/v-add-mail-domain-ssl
  35. 3 0
      bin/v-add-remote-dns-domain
  36. 3 0
      bin/v-add-remote-dns-host
  37. 3 0
      bin/v-add-remote-dns-record
  38. 2 1
      bin/v-add-sys-filemanager
  39. 1 0
      bin/v-add-sys-firewall
  40. 4 1
      bin/v-add-sys-ip
  41. 1 0
      bin/v-add-sys-quota
  42. 1 0
      bin/v-add-sys-sftp-jail
  43. 3 2
      bin/v-add-sys-theme
  44. 1 0
      bin/v-add-sys-webmail
  45. 3 0
      bin/v-add-user
  46. 3 0
      bin/v-add-user-2fa
  47. 1 0
      bin/v-add-user-composer
  48. 1 0
      bin/v-add-user-notification
  49. 1 0
      bin/v-add-user-package
  50. 3 0
      bin/v-add-user-sftp-jail
  51. 1 0
      bin/v-add-user-sftp-key
  52. 3 2
      bin/v-add-user-ssh-key
  53. 3 0
      bin/v-add-web-domain
  54. 3 0
      bin/v-add-web-domain-alias
  55. 3 0
      bin/v-add-web-domain-backend
  56. 3 0
      bin/v-add-web-domain-ftp
  57. 3 0
      bin/v-add-web-domain-httpauth
  58. 3 0
      bin/v-add-web-domain-proxy
  59. 5 2
      bin/v-add-web-domain-ssl
  60. 3 0
      bin/v-add-web-domain-ssl-force
  61. 1 0
      bin/v-add-web-domain-ssl-hsts
  62. 3 0
      bin/v-add-web-domain-stats
  63. 3 0
      bin/v-add-web-domain-stats-user
  64. 1 0
      bin/v-add-web-php
  65. 3 0
      bin/v-backup-user
  66. 1 0
      bin/v-backup-users
  67. 3 0
      bin/v-change-cron-job
  68. 3 0
      bin/v-change-database-host-password
  69. 3 0
      bin/v-change-database-owner
  70. 4 1
      bin/v-change-database-password
  71. 3 0
      bin/v-change-database-user
  72. 3 0
      bin/v-change-dns-domain-exp
  73. 5 2
      bin/v-change-dns-domain-ip
  74. 5 2
      bin/v-change-dns-domain-soa
  75. 3 0
      bin/v-change-dns-domain-tpl
  76. 5 2
      bin/v-change-dns-domain-ttl
  77. 4 1
      bin/v-change-dns-record
  78. 3 0
      bin/v-change-dns-record-id
  79. 3 0
      bin/v-change-domain-owner
  80. 3 0
      bin/v-change-firewall-rule
  81. 3 0
      bin/v-change-fs-file-permission
  82. 3 0
      bin/v-change-mail-account-password
  83. 3 0
      bin/v-change-mail-account-quota
  84. 3 0
      bin/v-change-mail-domain-catchall
  85. 1 0
      bin/v-change-mail-domain-sslcert
  86. 1 0
      bin/v-change-remote-dns-domain-exp
  87. 3 0
      bin/v-change-remote-dns-domain-soa
  88. 3 0
      bin/v-change-remote-dns-domain-ttl
  89. 3 0
      bin/v-change-sys-config-value
  90. 7 5
      bin/v-change-sys-db-alias
  91. 2 1
      bin/v-change-sys-demo-mode
  92. 3 0
      bin/v-change-sys-hestia-ssl
  93. 3 0
      bin/v-change-sys-hostname
  94. 3 0
      bin/v-change-sys-ip-name
  95. 3 0
      bin/v-change-sys-ip-nat
  96. 3 0
      bin/v-change-sys-ip-owner
  97. 3 0
      bin/v-change-sys-ip-status
  98. 5 2
      bin/v-change-sys-language
  99. 3 0
      bin/v-change-sys-port
  100. 1 0
      bin/v-change-sys-release

+ 1 - 0
bin/v-acknowledge-user-notification

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: update user notification
 # options: USER NOTIFICATION
+# labels: 
 #
 # The function updates user notification.
 

+ 3 - 0
bin/v-add-backup-host

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add backup host
 # options: TYPE HOST USERNAME PASSWORD [PATH] [PORT]
+# labels: 
+#
+# example: v-add-backup-host sftp backup.acme.com admin p4$$w@Rd
 #
 # This function adds a backup host
 

+ 1 - 0
bin/v-add-cron-hestia-autoupdate

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add cron job for hestia autoupdates
 # options: MODE
+# labels: 
 #
 # The function adds cronjob for hestia autoupdate from apt or git.
 

+ 4 - 1
bin/v-add-cron-job

@@ -1,9 +1,12 @@
 #!/bin/bash
 # info: add cron job
 # options: USER MIN HOUR DAY MONTH WDAY COMMAND [JOB] [RESTART]
+# labels: 
+#
+# example: v-add-cron-job admin * * * * * sudo /usr/local/hestia/bin/v-backup-users
 #
 # 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'.
+# is mailed to user's email if parameter REPORTS is set to 'yes'.
 
 
 #----------------------------------------------------------#

+ 1 - 0
bin/v-add-cron-letsencrypt-job

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add letsencrypt cronjob
 # options: NONE
+# labels: 
 #
 # The script for enabling letsencrypt cronjob
 

+ 4 - 1
bin/v-add-cron-reports

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add cron reports
-# options: user
+# options: USER
+# labels: 
+#
+# example: v-add-cron-reports admin
 #
 # The script for enabling reports on cron tasks and administrative
 # notifications.

+ 1 - 0
bin/v-add-cron-restart-job

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add cron reports
 # options: NONE
+# labels: 
 #
 # The script for enabling restart cron tasks
 

+ 4 - 1
bin/v-add-database

@@ -1,8 +1,11 @@
 #!/bin/bash
 # info: add database
 # options: USER DATABASE DBUSER DBPASS [TYPE] [HOST] [CHARSET]
+# labels: 
 #
-# The function creates the database concatenating username  and user_db.
+# example: v-add-database admin wordpress_db matt qwerty123
+#
+# The function creates the database concatenating username and user_db.
 # Supported types of databases you can get using v-list-sys-config script.
 # If the host isn't stated and there are few hosts configured on the server,
 # then the host will be defined by one of three algorithms. "First" will choose

+ 4 - 1
bin/v-add-database-host

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add new database server
-# options: TYPE HOST DBUSER DBPASS [MAX_DB] [CHARSETS] [TEMPLATE]
+# options: TYPE HOST DBUSER DBPASS [MAX_DB] [CHARSETS] [TEMPLATE] [PORT]
+# labels: 
+#
+# example: v-add-database-host mysql localhost alice p@$$wOrd
 #
 # 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

+ 3 - 0
bin/v-add-dns-domain

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add dns domain
 # options: USER DOMAIN IP [NS1] [NS2] [NS3] [..] [NS8] [RESTART]
+# labels: dns
+#
+# example: v-add-dns-domain admin example.com ns1.example.com ns2.example.com yes
 #
 # 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.

+ 3 - 0
bin/v-add-dns-on-web-alias

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add dns domain or dns record after web domain alias
 # options: USER ALIAS IP [RESTART]
+# labels: dns
+#
+# example: v-add-dns-on-web-alias admin www.example.com 8.8.8.8
 #
 # The function adds dns domain or dns record based on web domain alias.
 

+ 3 - 0
bin/v-add-dns-record

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add dns record
 # options: USER DOMAIN RECORD TYPE VALUE [PRIORITY] [ID] [RESTART] [TTL]
+# labels: dns
+#
+# example: v-add-dns-record admin acme.com www A 162.227.73.112
 #
 # 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

+ 3 - 0
bin/v-add-domain

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add web/dns/mail domain
 # options: USER DOMAIN [IP] [RESTART]
+# labels: 
+#
+# example: v-add-domain admin example.com
 #
 # The function adds web/dns/mail domain to a server.
 

+ 3 - 0
bin/v-add-firewall-ban

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add firewall blocking rule
 # options: IP CHAIN
+# labels: 
+#
+# example: v-add-firewall-ban 37.120.129.20 MAIL
 #
 # The function adds new blocking rule to system firewall
 

+ 3 - 0
bin/v-add-firewall-chain

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add firewall chain
 # options: CHAIN [PORT] [PROTOCOL] [PROTOCOL]
+# labels: 
+#
+# example: v-add-firewall-chain CRM 5678 TCP
 #
 # The function adds new rule to system firewall
 

+ 1 - 0
bin/v-add-firewall-ipset

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add firewall ipset
 # options: NAME [SOURCE] [IPVERSION] [AUTOUPDATE] [FORCE]
+# labels: hestia
 #
 # The function adds new ipset to system firewall
 

+ 3 - 0
bin/v-add-firewall-rule

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add firewall rule
 # options: ACTION IP PORT [PROTOCOL] [COMMENT] [RULE]
+# labels: 
+#
+# example: v-add-firewall-rule DROP 185.137.111.77 25
 #
 # The function adds new rule to system firewall
 

+ 4 - 1
bin/v-add-fs-archive

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: archive directory
-# options: USER ARCHIVE SOURCE
+# options: USER ARCHIVE SOURCE [SOURCE...]
+# labels: 
+#
+# example: v-add-fs-archive admin archive.tar readme.txt
 #
 # The function creates tar archive
 

+ 3 - 0
bin/v-add-fs-directory

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add directory
 # options: USER DIRECTORY
+# labels: 
+#
+# example: v-add-fs-directory admin mybar
 #
 # The function creates new directory on the file system
 

+ 3 - 0
bin/v-add-fs-file

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add file
 # options: USER FILE
+# labels: 
+#
+# example: v-add-fs-file admin readme.md
 #
 # The function creates new files on file system
 

+ 3 - 0
bin/v-add-letsencrypt-domain

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: check letsencrypt domain
 # options: USER DOMAIN [ALIASES] [MAIL]
+# labels: web
+#
+# example: v-add-letsencrypt-domain admin wonderland.com www.wonderland.com
 #
 # The function check and validates domain with Let's Encrypt
 

+ 2 - 1
bin/v-add-letsencrypt-host

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add letsencrypt for host and backend
-# options:
+# options: NONE
+# labels: hestia
 #
 # The function check and validates the backend certificate and generate
 # a new let's encrypt certificate.

+ 4 - 1
bin/v-add-letsencrypt-user

@@ -1,8 +1,11 @@
 #!/bin/bash
 # info: register letsencrypt user account
 # options: USER
+# labels: web
 #
-# The function creates and register LetsEncrypt account 
+# example: v-add-letsencrypt-user bob
+#
+# The function creates and register LetsEncrypt account
 
 
 #----------------------------------------------------------#

+ 3 - 0
bin/v-add-mail-account

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add mail domain account
 # options: USER DOMAIN ACCOUNT PASSWORD [QUOTA]
+# labels: mail
+#
+# example: v-add-mail-account john example.com john P4$$vvOrD
 #
 # The function add new email account.
 

+ 3 - 0
bin/v-add-mail-account-alias

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add mail account alias aka nickname
 # options: USER DOMAIN ACCOUNT ALIAS
+# labels: mail
+#
+# example: v-add-mail-account-alias admin acme.com alice alicia
 #
 # The function add new email alias.
 

+ 3 - 0
bin/v-add-mail-account-autoreply

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add mail account autoreply message
 # options: USER DOMAIN ACCOUNT MESSAGE
+# labels: mail
+#
+# example: v-add-mail-account-autoreply admin example.com user Hello from e-mail!
 #
 # The function add new email account.
 

+ 3 - 0
bin/v-add-mail-account-forward

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add mail account forward address
 # options: USER DOMAIN ACCOUNT FORWARD
+# labels: mail
+#
+# example: v-add-mail-account-forward admin acme.com alice bob
 #
 # The function add new email account.
 

+ 3 - 0
bin/v-add-mail-account-fwd-only

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add mail account forward-only flag
 # options: USER DOMAIN ACCOUNT
+# labels: mail
+#
+# example: v-add-mail-account-fwd-only admin example.com user
 #
 # The function adds fwd-only flag
 

+ 3 - 0
bin/v-add-mail-domain

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add mail domain
 # options: USER DOMAIN [ANTISPAM] [ANTIVIRUS] [DKIM] [DKIM_SIZE]
+# labels: mail
+#
+# example: v-add-mail-domain admin mydomain.tld
 #
 # The function adds MAIL domain.
 

+ 3 - 0
bin/v-add-mail-domain-antispam

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add mail domain antispam support
 # options: USER DOMAIN
+# labels: mail
+#
+# example: v-add-mail-domain-antispam admin mydomain.tld
 #
 # The function enables spamassasin for incoming emails.
 

+ 3 - 0
bin/v-add-mail-domain-antivirus

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add mail domain antivirus support
 # options: USER DOMAIN
+# labels: mail
+#
+# example: v-add-mail-domain-antivirus admin mydomain.tld
 #
 # The function enables clamav scan for incoming emails.
 

+ 3 - 0
bin/v-add-mail-domain-catchall

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add mail domain catchall account
 # options: USER DOMAIN EMAIL
+# labels: mail
+#
+# example: v-add-mail-domain-catchall admin example.com master@example.com
 #
 # The function enables catchall account for incoming emails.
 

+ 3 - 0
bin/v-add-mail-domain-dkim

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add mail domain dkim support
 # options: USER DOMAIN [DKIM_SIZE]
+# labels: mail
+#
+# example: v-add-mail-domain-dkim admin acme.com
 #
 # The function adds DKIM signature to outgoing domain emails.
 

+ 1 - 0
bin/v-add-mail-domain-ssl

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add mail SSL for $domain
 # options: USER DOMAIN SSL_DIR [RESTART]
+# labels: hestia
 #
 # The function turns on SSL support for a mail domain. Parameter ssl_dir
 # is a path to a directory where 2 or 3 ssl files can be found. Certificate file 

+ 3 - 0
bin/v-add-remote-dns-domain

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add remote dns domain
 # options: USER DOMAIN [FLUSH]
+# labels: dns
+#
+# example: v-add-remote-dns-domain admin mydomain.tld yes
 #
 # The function synchronize dns domain with the remote server.
 

+ 3 - 0
bin/v-add-remote-dns-host

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add new remote dns host
 # options: HOST PORT USER PASSWORD [TYPE] [DNS_USER]
+# labels: dns
+#
+# example: v-add-remote-dns-host slave.your_host.com 8083 admin your_passw0rd
 #
 # The function adds remote dns server to the dns cluster.
 

+ 3 - 0
bin/v-add-remote-dns-record

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add remote dns domain record
 # options: USER DOMAIN ID
+# labels: dns
+#
+# example: v-add-remote-dns-record bob acme.com 23
 #
 # The function synchronize dns domain with the remote server.
 

+ 2 - 1
bin/v-add-sys-filemanager

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add file manager functionality to Hestia Control Panel
-# options: none
+# options: [MODE]
+# labels: hestia
 #
 # The function installs the File Manager on the server
 # for access through the Web interface.

+ 1 - 0
bin/v-add-sys-firewall

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add system firewall
 # options: NONE
+# labels: 
 #
 # The script enables firewall
 

+ 4 - 1
bin/v-add-sys-ip

@@ -1,11 +1,14 @@
 #!/bin/bash
 # info: add system ip address
 # options: IP NETMASK [INTERFACE] [USER] [IP_STATUS] [IP_NAME] [NAT_IP]
+# labels: 
+#
+# example: v-add-sys-ip 216.239.32.21 255.255.255.0
 #
 # 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.
 # For example, if you set a1.myhosting.com as name, each new domain created on
-# this  ip will automatically receive alias $domain.a1.myhosting.com. Of course
+# this ip will automatically receive alias $domain.a1.myhosting.com. Of course
 # you must have wildcard record *.a1.myhosting.com pointed to ip. This feature 
 # is very handy when customer wants to test domain before dns migration.
 

+ 1 - 0
bin/v-add-sys-quota

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add system quota
 # options: NONE
+# labels: 
 #
 # The script enables filesystem quota on /home partition
 

+ 1 - 0
bin/v-add-sys-sftp-jail

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add system sftp jail
 # options: [RESTART]
+# labels: 
 #
 # The script enables sftp jailed environment
 

+ 3 - 2
bin/v-add-sys-theme

@@ -1,7 +1,8 @@
 #!/bin/bash
 # info: install theme from local source or GitHub.
-# options: theme [MODE] [ACTIVE]
-
+# options: THEME [MODE] [ACTIVE]
+# labels: hestia
+#
 # The function for installing a custom theme or downloading one
 # from the HestiaCP theme repository.
 

+ 1 - 0
bin/v-add-sys-webmail

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add webmail support for a domain
 # options: USER DOMAIN [RESTART] [QUIET]
+# labels: hestia
 #
 # this function adds support for webmail services
 # to a mail domain.

+ 3 - 0
bin/v-add-user

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add system user
 # options: USER PASSWORD EMAIL [PACKAGE] [NAME]
+# labels: 
+#
+# example: v-add-user admin2 P4$$w@rD bgates@aol.com
 #
 # The function creates new user account.
 

+ 3 - 0
bin/v-add-user-2fa

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add 2fa to existing user
 # options: USER
+# labels: hestia panel
+#
+# example: v-add-user-2fa admin
 #
 # The function creates a new 2fa token for user.
 

+ 1 - 0
bin/v-add-user-composer

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add composer (php dependency manager) for a user
 # options: USER
+# labels: hestia
 #
 # The function adds support for composer (php dependency manager)
 # Homepage: https://getcomposer.org/

+ 1 - 0
bin/v-add-user-notification

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add user notification
 # options: USER TOPIC NOTICE [TYPE]
+# labels: 
 #
 # The function adds user notification.
 

+ 1 - 0
bin/v-add-user-package

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: adding user package
 # options: PKG_DIR PACKAGE [REWRITE]
+# labels: 
 #
 # The function adds new user package to the system.
 

+ 3 - 0
bin/v-add-user-sftp-jail

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add user sftp jail
 # options: USER [RESTART]
+# labels: 
+#
+# example: v-add-user-sftp-jail admin
 #
 # The script enables sftp jailed environment
 

+ 1 - 0
bin/v-add-user-sftp-key

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add user sftp key
 # options: USER [TTL]
+# labels: hestia
 #
 # The script creates and updates ssh key for filemanager usage
 

+ 3 - 2
bin/v-add-user-ssh-key

@@ -1,8 +1,9 @@
 #!/bin/bash
 # info: add ssh key
-# options: USER key
+# options: USER KEY
+# labels: hestia
 #
-# Function check if $user/.ssh/authorized_keys exists and create it
+# Function check if $user/.ssh/authorized_keys exists and create it.
 # After that it append the new key(s)
 
 #----------------------------------------------------------#

+ 3 - 0
bin/v-add-web-domain

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add web domain
 # options: USER DOMAIN [IP] [ALIASES] [PROXY_EXTENSIONS] [RESTART]
+# labels: web
+#
+# example: v-add-web-domain admin wonderland.com 192.18.22.43 yes www.wonderland.com
 #
 # The function adds virtual host to a server. In cases when ip is
 # undefined in the script, "default" template will be used. The alias of

+ 3 - 0
bin/v-add-web-domain-alias

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add web domain alias
 # options: USER DOMAIN ALIASES [RESTART]
+# labels: web
+#
+# example: v-add-web-domain-alias admin acme.com www.acme.com yes
 #
 # The call is intended for adding aliases to a domain (it is also called
 # "domain parking"). The function supports wildcards *.domain.tpl.

+ 3 - 0
bin/v-add-web-domain-backend

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add web domain backend
 # options: USER DOMAIN [TEMPLATE] [RESTART]
+# labels: web
+#
+# example: v-add-web-domain-backend admin exmaple.com default yes
 #
 # The call is used for adding web backend configuration.
 

+ 3 - 0
bin/v-add-web-domain-ftp

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add ftp account for web domain.
 # options: USER DOMAIN FTP_USER FTP_PASSWORD [FTP_PATH]
+# labels: web
+#
+# example: v-add-web-domain-ftp alice wonderland.com alice_ftp p4$$vvOrD
 #
 # The function creates additional ftp account for web domain.
 

+ 3 - 0
bin/v-add-web-domain-httpauth

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add password protection for web domain
 # options: USER DOMAIN AUTH_USER AUTH_PASSWORD [RESTART]
+# labels: web
+#
+# example: v-add-web-domain-httpauth admin acme.com user02 super_pass
 #
 # The call is used for securing web domain with http auth
 

+ 3 - 0
bin/v-add-web-domain-proxy

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add webdomain proxy support
 # options: USER DOMAIN [TEMPLATE] [EXTENTIONS] [RESTART]
+# labels: web
+#
+# example: v-add-web-domain-proxy admin example.com
 #
 # The function enables proxy support for a domain. This can significantly
 # improve website speed.

+ 5 - 2
bin/v-add-web-domain-ssl

@@ -1,11 +1,14 @@
 #!/bin/bash
 # info: adding ssl for domain
 # options: USER DOMAIN SSL_DIR [SSL_HOME] [RESTART]
+# labels: web
+#
+# example: v-add-web-domain-ssl admin example.com /home/admin/conf/example.com/web
 #
 # 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
+# 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.
 

+ 3 - 0
bin/v-add-web-domain-ssl-force

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: Adding force SSL for a domain
 # options: USER DOMAIN
+# labels: hestia web
+#
+# example: v-add-web-domain-ssl-force admin acme.com
 #
 # The function forces SSL for the requested domain.
 

+ 1 - 0
bin/v-add-web-domain-ssl-hsts

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: Adding hsts to a domain
 # options: USER DOMAIN
+# labels: hestia
 #
 # The function enables HSTS for the requested domain.
 

+ 3 - 0
bin/v-add-web-domain-stats

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add log analyzer to generate domain statitics
 # options: USER DOMAIN TYPE
+# labels: web
+#
+# example: v-add-web-domain-stats admin example.com awstats
 #
 # The call is used for enabling log analyzer system to a domain. For viewing
 # the domain statistics use http://domain.tld/vstats/ link. Access this page

+ 3 - 0
bin/v-add-web-domain-stats-user

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add password protection to web domain statistics
 # options: USER DOMAIN STATS_USER STATS_PASSWORD [RESTART]
+# labels: web
+#
+# example: v-add-web-domain-stats-user admin example.com watchdog your_password
 #
 # The call is used for securing the web statistics page.
 

+ 1 - 0
bin/v-add-web-php

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: add php fpm version
 # options: VERSION
+# labels: hestia
 #
 # The function checks and delete a fpm php version if not used by any domain.
 

+ 3 - 0
bin/v-backup-user

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: backup system user with all its objects
 # options: USER NOTIFY
+# labels: 
+#
+# example: v-backup-user admin yes
 #
 # The call is used for backing up user with all its domains and databases.
 

+ 1 - 0
bin/v-backup-users

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

+ 3 - 0
bin/v-change-cron-job

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change cron job
 # options: USER JOB MIN HOUR DAY MONTH WDAY COMMAND
+# labels: 
+#
+# example: v-change-cron-job admin 7 * * * * * * /usr/bin/uptime
 #
 # The function is used for changing existing job. It fully replace job
 # parameters with new one but with same id.

+ 3 - 0
bin/v-change-database-host-password

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change database server password
 # options: TYPE HOST USER PASSWORD
+# labels: 
+#
+# example: v-change-database-host-password mysql localhost wp_user pA$$w@rD
 #
 # The function changes database server password.
 

+ 3 - 0
bin/v-change-database-owner

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change database owner
 # options: DATABASE USER
+# labels: 
+#
+# example: v-change-database-owner mydb alice
 #
 # The function for changing database owner.
 

+ 4 - 1
bin/v-change-database-password

@@ -1,8 +1,11 @@
 #!/bin/bash
 # info: change database password
 # options: USER DATABASE DBPASS
+# labels: 
 #
-# The function for changing database user  password to a database. It uses the
+# example: v-change-database-password admin wp_db neW_pAssWorD
+#
+# The function for changing database user password to a database. It uses the
 # full name of database as argument.
 
 

+ 3 - 0
bin/v-change-database-user

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change database username
 # options: USER DATABASE DBUSER [DBPASS]
+# labels: 
+#
+# example: v-change-database-user admin my_db joe_user
 #
 # The function for changing database user. It uses the
 

+ 3 - 0
bin/v-change-dns-domain-exp

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change dns domain expiration date
 # options: USER DOMAIN EXP
+# labels: dns
+#
+# example: v-change-dns-domain-exp admin domain.pp.ua 2020-11-20
 #
 # The function of changing the term of expiration domain's registration. The
 # serial number will be refreshed automatically during update.

+ 5 - 2
bin/v-change-dns-domain-ip

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change dns domain ip address
-# options: USER DOMAIN IP
+# options: USER DOMAIN IP [RESTART]
+# labels: dns
+#
+# example: v-change-dns-domain-ip admin domain.com 123.212.111.222
 #
 # The function for changing the main ip of DNS zone.
 
@@ -31,7 +34,7 @@ format_domain_idn
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '3' "$#" 'USER DOMAIN IP'
+check_args '3' "$#" 'USER DOMAIN IP [RESTART]'
 is_format_valid 'user' 'domain' 'ip'
 is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
 is_object_valid 'user' 'USER' "$user"

+ 5 - 2
bin/v-change-dns-domain-soa

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change dns domain soa record
-# options: USER DOMAIN SOA
+# options: USER DOMAIN SOA [RESTART]
+# labels: dns
+#
+# example: v-change-dns-domain-soa admin acme.com d.ns.domain.tld
 #
 # The function for changing SOA record. This type of records can not be
 # modified by v-change-dns-record call.
@@ -32,7 +35,7 @@ format_domain_idn
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '3' "$#" 'USER DOMAIN SOA'
+check_args '3' "$#" 'USER DOMAIN SOA [RESTART]'
 is_format_valid 'user' 'domain' 'soa'
 is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
 is_object_valid 'user' 'USER' "$user"

+ 3 - 0
bin/v-change-dns-domain-tpl

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change dns domain template
 # options: USER DOMAIN TEMPLATE [RESTART]
+# labels: dns
+#
+# example: v-change-dns-domain-tpl admin example.com child-ns yes
 #
 # The function for changing the template of records. By updating old records
 # will be removed and new records will be generated in accordance with

+ 5 - 2
bin/v-change-dns-domain-ttl

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change dns domain ttl
-# options: USER DOMAIN TTL
+# options: USER DOMAIN TTL [RESTART]
+# labels: dns
+#
+# example: v-change-dns-domain-ttl alice example.com 14400
 #
 # The function for changing the time to live TTL parameter for all records.
 
@@ -31,7 +34,7 @@ format_domain_idn
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '3' "$#" 'USER DOMAIN TTL'
+check_args '3' "$#" 'USER DOMAIN TTL [RESTART]'
 is_format_valid 'user' 'domain' 'ttl'
 is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
 is_object_valid 'user' 'USER' "$user"

+ 4 - 1
bin/v-change-dns-record

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change dns domain record
-# options: USER DOMAIN ID VALUE [PRIORITY] [RESTART] [TTL]
+# options: USER DOMAIN ID RECORD TYPE VALUE [PRIORITY] [RESTART] [TTL]
+# labels: dns
+#
+# example: v-change-dns-record admin domain.ua 42 192.18.22.43
 #
 # The function for changing DNS record.
 

+ 3 - 0
bin/v-change-dns-record-id

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change dns domain record id
 # options: USER DOMAIN ID NEWID [RESTART]
+# labels: dns
+#
+# example: v-change-dns-record-id admin acme.com 24 42 yes
 #
 # The function for changing internal record id.
 

+ 3 - 0
bin/v-change-domain-owner

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change domain owner
 # options: DOMAIN USER
+# labels: 
+#
+# example: v-change-domain-owner www.example.com bob
 #
 # The function of changing domain ownership.
 

+ 3 - 0
bin/v-change-firewall-rule

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change firewall rule
 # options: RULE ACTION IP PORT [PROTOCOL] [COMMENT]
+# labels: 
+#
+# example: v-change-firewall-rule 3 ACCEPT 5.188.123.17 443
 #
 # The function is used for changing existing firewall rule.
 # It fully replace rule with new one but keeps same id.

+ 3 - 0
bin/v-change-fs-file-permission

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change file permission
 # options: USER FILE PERMISSIONS
+# labels: 
+#
+# example: v-change-fs-file-permission admin readme.txt 0777
 #
 # The function changes file access permissions on the file system
 

+ 3 - 0
bin/v-change-mail-account-password

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change mail account password
 # options: USER DOMAIN ACCOUNT PASSWORD
+# labels: mail
+#
+# example: v-change-mail-account-password admin mydomain.tld user p4$$vvOrD
 #
 # The function changes email account password.
 

+ 3 - 0
bin/v-change-mail-account-quota

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change mail account quota
 # options: USER DOMAIN ACCOUNT QUOTA
+# labels: mail
+#
+# example: v-change-mail-account-quota admin mydomain.tld user01 unlimited
 #
 # The function changes email account disk quota.
 

+ 3 - 0
bin/v-change-mail-domain-catchall

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change mail domain catchall email
 # options: USER DOMAIN EMAIL
+# labels: mail
+#
+# example: v-change-mail-domain-catchall user01 mydomain.tld master@mydomain.tld
 #
 # The function changes mail domain catchall.
 

+ 1 - 0
bin/v-change-mail-domain-sslcert

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: change domain ssl certificate
 # options: USER DOMAIN SSL_DIR [RESTART]
+# labels: hestia
 #
 # The function changes SSL domain certificate and the key. If ca file present
 # it will be replaced as well.

+ 1 - 0
bin/v-change-remote-dns-domain-exp

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: change remote dns domain expiration date
 # options: USER DOMAIN
+# labels: dns
 #
 # The function synchronize dns domain with the remote server.
 

+ 3 - 0
bin/v-change-remote-dns-domain-soa

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change remote dns domain SOA
 # options: USER DOMAIN
+# labels: dns
+#
+# example: v-change-remote-dns-domain-soa admin example.org.uk
 #
 # The function synchronize dns domain with the remote server.
 

+ 3 - 0
bin/v-change-remote-dns-domain-ttl

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change remote dns domain TTL
 # options: USER DOMAIN
+# labels: dns
+#
+# example: v-change-remote-dns-domain-ttl admin domain.tld
 #
 # The function synchronize dns domain with the remote server.
 

+ 3 - 0
bin/v-change-sys-config-value

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change sysconfig value
 # options: KEY VALUE
+# labels: panel
+#
+# example: v-change-sys-config-value VERSION 1.0
 #
 # The function is for changing main config settings such as COMPANY_NAME or
 # COMPANY_EMAIL and so on.

+ 7 - 5
bin/v-change-sys-db-alias

@@ -1,11 +1,13 @@
 #!/bin/bash
 # info: change phpmyadmin/phppgadmin alias url
-# options: type alias
-# example:  v-change-sys-db-alias pma phpmyadmin
-#           Sets phpMyAdmin alias to phpmyadmin
+# options: TYPE ALIAS
+# labels: hestia
 #
-# example:  v-change-sys-db-alias pga phppgadmin
-#           Sets phpPgAdmin alias to phppgadmin
+# example: v-change-sys-db-alias pma phpmyadmin
+#          # Sets phpMyAdmin alias to phpmyadmin
+#
+# example: v-change-sys-db-alias pga phppgadmin
+#          # Sets phpPgAdmin alias to phppgadmin
 #
 # This function changes the database editor url in
 # apache2 or nginx configuration.

+ 2 - 1
bin/v-change-sys-demo-mode

@@ -1,10 +1,11 @@
 #!/bin/bash
 # info: enable or disable demo mode
 # options: ACTIVE
+# labels: hestia
+#
 # This function will set the demo mode variable,
 # which will prevent usage of certain v-scripts in the backend
 # and prevent modification of objects in the control panel.
-#
 # It will also disable virtual hosts for Apache and NGINX
 # for domains which have been created.
 

+ 3 - 0
bin/v-change-sys-hestia-ssl

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change hestia ssl certificate
 # options: SSL_DIR [RESTART]
+# labels: panel
+#
+# example: v-change-sys-hestia-ssl /home/new/dir/path yes
 #
 # The function changes hestia SSL certificate and the key.
 

+ 3 - 0
bin/v-change-sys-hostname

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change hostname
 # options: HOSTNAME
+# labels: panel
+#
+# example: v-change-sys-hostname mydomain.tld
 #
 # The function for changing system hostname.
 

+ 3 - 0
bin/v-change-sys-ip-name

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change ip name
 # options: IP NAME
+# labels: panel
+#
+# example: v-change-sys-ip-name 80.122.52.70 acme.com
 #
 # The function for changing dns domain associated with ip.
 

+ 3 - 0
bin/v-change-sys-ip-nat

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change ip nat address
 # options: IP NAT_IP [RESTART]
+# labels: panel
+#
+# example: v-change-sys-ip-nat 185.209.50.140 10.110.104.205
 #
 # The function for changing nat ip associated with ip.
 

+ 3 - 0
bin/v-change-sys-ip-owner

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change ip owner
 # options: IP USER
+# labels: panel
+#
+# example: v-change-sys-ip-owner 91.198.136.14 admin
 #
 # The function of changing ip address ownership.
 

+ 3 - 0
bin/v-change-sys-ip-status

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change ip status
 # options: IP IP_STATUS
+# labels: panel
+#
+# example: v-change-sys-ip-status 91.198.136.14 yourstatus
 #
 # The function of changing an ip address's status.
 

+ 5 - 2
bin/v-change-sys-language

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change sys language
-# options: LANGUAGE
+# options: LANGUAGE [UPDATE_USERS]
+# labels: panel
+#
+# example: v-change-sys-language ru
 #
 # The function for changing system language.
 
@@ -31,7 +34,7 @@ is_language_valid() {
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '1' "$#" 'LANGUAGE'
+check_args '1' "$#" 'LANGUAGE [UPDATE_USERS]'
 is_format_valid 'language'
 is_language_valid $language
 

+ 3 - 0
bin/v-change-sys-port

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: change system backend port
 # options: PORT
+# labels: hestia panel
+#
+# example: v-change-sys-port 5678
 #
 # The function for changing the system backend port in NGINX configuration.
 

+ 1 - 0
bin/v-change-sys-release

@@ -1,6 +1,7 @@
 #!/bin/bash
 # info: update web templates
 # options: [RESTART]
+# labels: hestia
 #
 # The function for changing the release branch for the
 # Hestia Control Panel. This allows the user to switch between

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