Browse Source

Merge pull request #1390 from hestiacp/releases/v1.3

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

+ 32 - 0
CHANGELOG.md

@@ -1,6 +1,38 @@
 # Changelog
 All notable changes to this project will be documented in this file.
 
+## [1.3.1] - Service Release
+### Features
+- No new features have been introduced in this release.
+
+### Bugfixes
+- Fixed an issue where updates for `hestia-php` were incorrectly being marked as out-of-date in the UI due to a change in our servicing and package versioning scheme.
+- Fixed an issue that occured on the Updates page where the table row color of available updates would be difficult to read.
+- Fixed an issue where an administrator would get stuck in a loop trying to navigate back after adding a SSH key.
+- Fixed an issue where long table entries which exceeded the table length would overlap other UI elements.
+- Fixed an issue where the total amount of items on a page would fail to display correctly.
+- Improved the accuracy and reliability of tooltips throughout the the Control Panel UI:
+    - Removed unnecessary tooltips from buttons and other elements.
+    - Fixed incorrect tags which prevented tooltips from being displayed.
+    - Introduced tooltips to counter items on the Users, Packages, and Statistics pages to help better distinguish statistics.
+- Improved the display of items, quotas, and suspended items in the Control Panel navigation header - thanks **@cmstew**!
+- Fixed an issue which caused higher than normal CPU usage during an upgrade due to a duplicate condition in the rebuild process.
+- Fixed minor spelling inconsistencies in command line script comments and output text.
+- Fixed an issue where old configuration files were not cleaned up when moving domains with `v-change-domain-owner`.
+- Fixed an issue where a `no backend template doesn't exist` could potentially would appear after upgrade with older templates (#1322).
+- Introduced caching templates for nginx + php-fpm configurations  - thanks **@cmstew**!
+- Fixed an issue where DNS cluster updates could fail due to the format of a DKIM record in an available zone - thanks **@jrohde**!
+- Improved the quality of comment formatting in command line scripts - thanks **@bisubus**! 
+- Fixed an issue where the logo was not displayed in the File Manager - thanks **@robothemes**!
+- Fixed an issue in the Control Panel UI which caused databases and additional FTP accounts to be named incorrectly if manually prefaced with the username.
+- Fixed an issue where custom document roots were not saved correctly.
+- Improved the visibility of service availability in the Control Panel UI.
+- Fixed an issue which let you unsuspend a cronjob on active demo mode.
+- Updated DE, EN, ES, KO, NL and TR languages, thanks to @Wibol, Blackjack, @emrahkayihan, areo and @hahagu!
+- Fixed an issue which let the auto compiler fail with local src builds.
+- Added turkish language to system installers, thanks to @emrahkayihan!
+- Fixed incorrect error message when using unknown domain with v-delete-domain.
+
 ## [1.3.0] - Major Release (Feature / Quality Update)
 ### Features
 - Users can now choose to point a domain to a different document root location (similar to domain parking).

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

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: update user notification
 # options: USER NOTIFICATION
+# labels: panel
+#
+# example: v-acknowledge-user-notification
 #
 # 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

+ 4 - 1
bin/v-add-dns-domain

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add dns domain
-# options: USER DOMAIN IP [NS1] [NS2] [NS3] [..] [NS8] [RESTART]
+# options: USER DOMAIN IP [NS1] [NS2] [NS3] [NS4] [NS5] [NS6] [NS7] [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.
 

+ 7 - 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
 
@@ -21,6 +24,7 @@ iptables="/sbin/iptables"
 
 # Includes
 source $HESTIA/func/main.sh
+source $HESTIA/func/firewall.sh
 source $HESTIA/conf/hestia.conf
 
 
@@ -40,6 +44,9 @@ check_hestia_demo_mode
 #                       Action                             #
 #----------------------------------------------------------#
 
+# Self heal iptables links
+heal_iptables_links
+
 # Checking server ip
 if [ -e "$HESTIA/data/ips/$ip" ] || [ "$ip" = '127.0.0.1' ]; then
     exit

+ 7 - 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
 
@@ -29,6 +32,7 @@ fi
 
 # Includes
 source $HESTIA/func/main.sh
+source $HESTIA/func/firewall.sh
 source $HESTIA/conf/hestia.conf
 
 
@@ -47,6 +51,9 @@ check_hestia_demo_mode
 #                       Action                             #
 #----------------------------------------------------------#
 
+# Self heal iptables links
+heal_iptables_links
+
 # Checking known chains
 case $chain in
     SSH)        # Get ssh port by reading ssh config file.

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

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add firewall ipset
 # options: NAME [SOURCE] [IPVERSION] [AUTOUPDATE] [FORCE]
+# labels: hestia
+#
+# example: v-add-firewall-ipset country-nl 'http://ipverse.net/ipblocks/data/countries/nl.zone'
 #
 # 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 user 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.
 

+ 4 - 1
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.
 
@@ -71,7 +74,7 @@ fi
 if [ ! -z "$DNS_SYSTEM" ] && [ -e "$USER_DATA/dns/$domain.conf" ]; then
     p=$(cat $USER_DATA/mail/$domain.pub |grep -v ' KEY---' |tr -d '\n')
     record="_domainkey"
-    policy="\"t=y; o=~;\""
+    policy="\"t=y\; o=~\;\""
     $BIN/v-add-dns-record $user $domain $record TXT "$policy" '' '' 'no'
 
     record="mail._domainkey"

+ 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.
 

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

@@ -1,8 +1,15 @@
 #!/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
+# 
+# example: v-add-remote-dns-host slave.your_host.com 8083 api_key ''
 #
 # The function adds remote dns server to the dns cluster.
+# As alternative api_key generated on the slave server.
+# See v-generate-api-key can be used to connect the remote dns server
 
 
 #----------------------------------------------------------#

+ 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.

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

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add system firewall
 # options: NONE
+# labels: 
+#
+# example: v-add-sys-firewall
 #
 # 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.
 

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

@@ -1,8 +1,12 @@
 #!/bin/bash
 # info: add system quota
 # options: NONE
+# labels: 
+#
+# example: v-add-sys-quota
 #
 # The script enables filesystem quota on /home partition
+# Some kernels do require additional packages to be installed first
 
 
 #----------------------------------------------------------#

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

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

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

@@ -1,9 +1,14 @@
 #!/bin/bash
 # info: install theme from local source or GitHub.
-# options: theme [MODE] [ACTIVE]
-
+# options: THEME [MODE] [ACTIVE]
+# labels: hestia
+#
+# example: v-add-sys-theme myTheme local 
+#
 # The function for installing a custom theme or downloading one
 # from the HestiaCP theme repository.
+# For more info see https://docs.hestiacp.com/customize_hestia.html
+
 
 #----------------------------------------------------------#
 #                    Variable&Function                     #

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

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add webmail support for a domain
 # options: USER DOMAIN [RESTART] [QUIET]
+# labels: hestia
+#
+# example: v-add-sys-webmail user domain.com
 #
 # 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.
 

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

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add composer (php dependency manager) for a user
 # options: USER
+# labels: hestia
+#
+# example: v-add-user-composer user
 #
 # 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
 

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

@@ -1,8 +1,11 @@
 #!/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
+# example: v-add-user-ssh-key user 'valid ssh key'
+#
+# 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.

+ 9 - 5
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.
 
@@ -93,6 +96,10 @@ if [ -e "$USER_DATA/ssl/$domain.ca" ]; then
     cp -f $USER_DATA/ssl/$domain.ca $HOMEDIR/$user/conf/web/$domain/ssl/$domain.ca
 fi
 
+if [ "$SSL_FORCE" == "yes" ]; then
+    # Enabling SSL redirection on demand
+    $BIN/v-add-web-domain-ssl-force "$user" "$domain"
+fi
 # Parsing domain values
 get_domain_values 'web'
 local_ip=$(get_real_ip $IP)
@@ -120,9 +127,6 @@ increase_user_value "$user" '$U_WEB_SSL'
 update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
 update_object_value 'web' 'DOMAIN' "$domain" '$SSL' "yes"
 
-# Enabling automatic SSL redirection
-$BIN/v-add-web-domain-ssl-force "$user" "$domain"
-
 # Restarting web server
 $BIN/v-restart-web $restart
 check_result $? "Web restart failed" >/dev/null

+ 5 - 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.
 
@@ -67,6 +70,8 @@ else
     echo 'RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]' >> $forcessl
 fi
 
+chown root:$user $forcessl
+chmod 640 $forcessl
 
 #----------------------------------------------------------#
 #                       Hestia                             #

+ 3 - 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.
 
@@ -55,6 +56,8 @@ fi
 
 echo 'add_header Strict-Transport-Security "max-age=15768000;" always;' > $hstsconf
 
+chown root:$user $hstsconf
+chmod 640 $hstsconf
 
 #----------------------------------------------------------#
 #                       Hestia                             #

+ 58 - 0
bin/v-add-web-domain-ssl-preset

@@ -0,0 +1,58 @@
+#!/bin/bash
+# info: Adding force SSL for a domain
+# options: USER DOMAIN [SSL] 
+# labels: hestia web
+#
+# example: v-add-web-domain-ssl-preset
+#
+# Up on creating an web domain set the SSL Force values due to the delay of LE due to DNS propergation over DNS cluster
+# When LE has been activated it will set the actions
+
+#----------------------------------------------------------#
+#                    Variable&Function                     #
+#----------------------------------------------------------#
+
+# Argument definition
+user=$1
+domain=$2
+ssl=$3
+
+# Includes
+source $HESTIA/func/main.sh
+source $HESTIA/conf/hestia.conf
+
+#----------------------------------------------------------#
+#                    Verifications                         #
+#----------------------------------------------------------#
+
+check_args '2' "$#" 'USER DOMAIN [SSL]'
+is_format_valid 'user' 'domain' 'ssl'
+is_object_valid 'user' 'USER' "$user"
+is_object_unsuspended 'user' 'USER' "$user"
+is_object_valid 'web' 'DOMAIN' "$domain"
+is_object_unsuspended 'web' 'DOMAIN' "$domain"
+
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
+
+#----------------------------------------------------------#
+#                       Action                             #
+#----------------------------------------------------------#
+
+# Load domain data
+parse_object_kv_list $(grep "DOMAIN='$domain'" $USER_DATA/web.conf)
+
+if [  "$ssl" = "yes" ]; then
+    if [ -z "$SSL_FORCE" ]; then
+    add_object_key "web" 'DOMAIN' "$domain" 'SSL_FORCE' 'SSL_HOME'
+    fi
+
+    # Set forcessl flag to enabled
+    update_object_value 'web' 'DOMAIN' "$domain" '$SSL_FORCE' 'yes'
+fi
+
+# Logging
+log_history "Set values SSL FORCE / HSTS for $domain"
+log_event "$OK" "$ARGUMENTS"
+
+exit

+ 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.
 

+ 9 - 5
bin/v-add-web-php

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add php fpm version
 # options: VERSION
+# labels: hestia
+#
+# example: v-add-web-php 7.4
 #
 # The function checks and delete a fpm php version if not used by any domain.
 
@@ -28,19 +31,20 @@ php_fpm="/etc/init.d/php$version-fpm"
 
 # Verify php version format
 if [[ ! $version =~ ^[0-9]\.[0-9]+ ]]; then
-    echo "The php version format is invalid, it should look like [0-9].[0-9]..."
+    echo "The specified PHP version format is invalid, it should look like [0-9].[0-9]."
+    echo "Example:  7.0, 7.4"
     exit
 fi
 
 # Check if php version already exists
 if [ -f "$php_fpm" ] && [ -f "$HESTIA/data/templates/web/php-fpm/PHP-${version/\./_}.tpl" ]; then
-    echo "Version already installed..."
+    echo "ERROR: Specified PHP version is already installed."
     exit
 fi
 
 # Check if php version is supported
 if [ ! -f "$HESTIA_INSTALL_DIR/multiphp/$WEB_SYSTEM/PHP-${version//.}.sh" ]; then
-    echo "Version is currently not supported or does not exist..."
+    echo "ERROR: Specified PHP version is not supported or does not exist."
     exit
 fi
 
@@ -77,7 +81,7 @@ apt-get -y -qq -o Dpkg::Options::="--force-confold" install $mph > /dev/null 2>&
 BACK_PID=$!
 
 # Check if package installation is done, print a spinner
-echo "Install PHP-$version, please wait..."
+echo "Installing PHP-$version, please wait..."
 spinner="/-\|"
 spin_i=1
 while kill -0 $BACK_PID > /dev/null 2>&1 ; do
@@ -90,7 +94,7 @@ echo
 
 # Check if installation was sucessfully
 if [ ! -f "$php_fpm" ]; then
-    echo "Installation failed, please run the following command manualy for debuging:"
+    echo "ERROR: Installation failed, please run the following command manually for debugging:"
     echo "apt-get install $mph"
 fi
 

+ 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.
 

+ 3 - 0
bin/v-backup-users

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: backup all users
 # options: NONE
+# labels: 
+#
+# example: v-backup-users
 #
 # 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.
 

+ 9 - 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.
 
@@ -94,6 +97,9 @@ if [ ! -z "$web_data" ]; then
     $BIN/v-unsuspend-web-domain $user $domain no >> /dev/null 2>&1
     $BIN/v-rebuild-web-domains $owner no
     $BIN/v-rebuild-web-domains $user
+
+    # Cleanup old config
+    rm -rf $HOMEDIR/$owner/conf/web/$domain/
 fi
 
 # DNS domain
@@ -121,6 +127,9 @@ if [ ! -z "$dns_data" ]; then
     $BIN/v-rebuild-dns-domains $owner no
     $BIN/v-rebuild-dns-domains $user
 
+    # Cleanup old config
+    rm -f $HOMEDIR/$owner/conf/dns/$domain.db
+
     # Resync dns cluster
     if [ ! -z "$DNS_CLUSTER" ]; then
         v-sync-dns-cluster

+ 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.
 

+ 5 - 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.
@@ -20,6 +23,8 @@ source $HESTIA/conf/hestia.conf
 
 PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin"
 
+# Perform verification if read-only mode is enabled
+check_hestia_demo_mode
 
 #----------------------------------------------------------#
 #                    Verifications                         #

+ 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.
 

+ 4 - 1
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.
 
@@ -36,7 +39,7 @@ if [ "$web_domains" -ne '0' ] && [ "$sys_user" != "$ip_owner" ]; then
     check_result "$E_INUSE" "ip $ip is used"
 fi
 if [ "$ip_owner" != "admin" ] && [ "$ip_status" == "shared" ]; then
-    check_result "$E_INVALID" "Only the 'admin' user can have a shared ip"
+    $HESTIA/bin/v-change-sys-ip-owner $ip admin
 fi
 
 # Perform verification if read-only mode is enabled

+ 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
 

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