Browse Source

Merge pull request #1446 from hestiacp/main

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

+ 46 - 0
CHANGELOG.md

@@ -1,6 +1,52 @@
 # Changelog
 All notable changes to this project will be documented in this file.
 
+## [1.3.2] - Service Release
+### Features
+- No new features have been introduced in this release.
+
+### Bugfixes
+- Fixed an issue where Let's Encrypt certificates were not regenerated when changing domain aliases (#1353)
+- Fixed an issue where user name was duplicated when editing FTP users (#1411)
+- Fixed an issue where the iptables service would appear to be in a stopped state when fail2ban is stopped. (#1374)
+- Fixed an issue where the default language value was incorrectly set under Server Settings > Configure.
+- Fixed an issue with the dark theme where available updates were incorrectly displayed.
+- Fixed an issue where local and FTP backup files were not deleted when running `v-delete-user-backup`. (#1421)
+- Fixed an issue where IP addresses could not be deleted (#1423)
+- Improvements have been made to the API's error handling - thanks **@danielalexis**!
+
+## [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).

+ 19 - 59
CONTRIBUTING.md

@@ -4,16 +4,16 @@ Hestia Control Panel - Contribution Guidelines
 Ways to contribute
 -----------------------
 - **Beta testing**:
-    - Download and install builds from the `beta` branch. Provide feedback to our developers and file any issues that you come across on [GitHub](https://www.github.com/hestiacp/hestiacp/issues).<br>
+    - Download and install builds from the `beta` branch. If you encounter an issue with a beta build, file an issue report on [GitHub](https://www.github.com/hestiacp/hestiacp/issues).<br>
     `v-update-sys-hestia-git hestiacp beta install` will install the latest beta build from our GitHub repository.
 - **Code review and bug fixes**:
-    - Read over the code and if you notice errors (even spelling mistakes), submit a pull request with your fixes.
+    - Read over the code and if you notice errors (even spelling mistakes), submit a pull request with your changes.
 - **New features**:
-    - Is there an awesome feature that you'd love to see included? While our development team tries to fulfill all reasonable requests, it can take time to implement new features depending on the amount of work involved. Submit a pull request with your code and if your idea is approved, we'll review and test it for inclusion with an upcoming release.
+    - Is there an awesome feature that you'd love to see included? Submit a pull request with your changes, and if approved your PR will be reviewed and merged for inclusion in an upcoming release. While our development team tries to accomodate all reasonable requests please remember that it does take time to develop, implement and test new features and as such we may not be able to fulfill all requests or may have to put a feature on backlog for a later date. 
 - **Translations**:
-    - If you are a non-English speaker and would like to improve the quality of the translations used in Hestia Control Panel's web interface, Please go to [Hestia Translate](https://translate.hestiacp.com/projects/hestiacp/) to review the translations. For more information please read [How to contribute with Translations](https://forum.hestiacp.com/t/how-to-contribute-with-translations/1664).  Or open an issue report [GitHub](https://www.github.com/hestiacp/hestiacp/issues) highlighting the issue with the current translation so that it can be corrected.
+    - If you are a non-English speaker and would like to improve the quality of the translations used in Hestia Control Panel's web interface, please go to [Hestia Translate](https://translate.hestiacp.com/projects/hestiacp/) to review the translations database. For more information please read [How to contribute with Translations](https://forum.hestiacp.com/t/how-to-contribute-with-translations/1664) on our forum.  You can also open an issue report [GitHub](https://www.github.com/hestiacp/hestiacp/issues) highlighting the issue with the current translation so that it can be corrected.
 - **Donations**:
-    - If you're not a developer but you still want to make a contribution, you can make a donation to the Hestia Control Panel project to further its development (or if you'd just like to buy our developers a lunch, we'd appreciate that too). We currently accept donations through [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ST87LQH2CHGLA).
+    - If you're not a developer but you still want to make a contribution to support Hestia Control Panel and our developers, you can make a donation to the Hestia Control Panel project to further its development (or if you'd just like to buy our developers a lunch, we'd appreciate that too). We currently accept donations through [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ST87LQH2CHGLA).
 
 Development Guidelines
 -----------------------
@@ -25,28 +25,27 @@ Development for this project takes place in branches to effectively develop, man
 
 We have three primary or "evergreen" branches, which exist throughout our product's lifetime. Please refer to the following table for a description:
 
-| Branch        | Description     | Cycle           |
-|---------------|:---------------:|:---------------:|
-| `main`        | Contains a snapshot of the latest development code.<br>**Not intended for production use and contains code from a merge snapshot.** | Daily  |
-| `beta`        | Contains a snapshot of the next version which is currently in testing.<br>**Not intended for production but should be highly stable.**  | Weekly |
-| `release`     | Contains a snapshot of the latest stable release.<br>**Intended for production use. This repository contains the same code as our compiled packages.** | Monthly |
+| Branch        | Description     
+|---------------|:---------------:|
+| `main`        | Contains a snapshot of the latest development code.<br>**Not intended for production use and contains code from a merge snapshot.**
+| `beta`        | Contains a snapshot of the next version which is currently in testing.<br>**Not intended for production use, however code from this branch should be stable.**
+| `release`     | Contains a snapshot of the latest stable release.<br>**Intended for production use. This repository contains the same code as our compiled packages.**
 
 ### Creating a new branch and submitting pull requests
-The first step is to create a fork of the `hestiacp/hestiacp` repository under your account so that you may submit pull requests and patches via GitHub. 
+The first step is to create a fork of the `hestiacp/hestiacp` repository under your GitHub account so that you may submit pull requests and patches.
 
-Once you've created your fork, clone the repository to your computer and make sure that you've checked out the `main` branch. **Always** create a new topic branch for you work. When submitting pull requests it is important that you target the correct branch to ensure that your changes are properly integrated and tested based on our release schedule. When creating a new branch, we ask that you please adhere to the following naming conventions as much as possible:
+Once you've created your fork, clone the repository to your computer and make sure that you've checked out the `main` branch. **Always** create a new topic branch for your work.
 
 ### Branch naming convention:
 - **Prefix:** `topic/` (such as **fix**, **feature**, **refactor**, etc.)
-- **ID**: `888` (GitHub Issue ID if an issue exists) -or- `2020-07` (Year-Month if an issue does not already exist)
-- **Separator:** `_` (underscore)
+- **ID**: `888` (GitHub Issue ID if an issue exists)
 - **Title:** `my-awesome-patch`
 
 Branch name examples:
-* `feature/777_my-awesome-new-feature` or `feature/2020-07_my-other-new-feature`
-* `fix/000_some-bug-fix` or `fix/2020-07_this-feature-is-broken`
-* `refactor/2020-07_v-change-domain-owner`
-* `test/2020-07_mail-domain-ssl`
+* `feature/777-my-awesome-new-feature` or `feature/my-other-new-feature`
+* `fix/000-some-bug-fix` or `fix/this-feature-is-broken`
+* `refactor/v-change-domain-owner`
+* `test/mail-domain-ssl`
 
 ### Squashing commits for smaller changes
 To aid other developers and keep the project's commit history clean, please **squash your commits** when it's appropriate. For example with smaller commits related to the same piece of code, such as commits labelled "Fixed item 1", "Adjusted color of button XYZ", "Adjusted alignment of button XYZ" can be squashed into one commit with the title "Fixed button issues in item". 
@@ -55,48 +54,9 @@ To aid other developers and keep the project's commit history clean, please **sq
 - Our internal development team will review your work and validate your request.
 - Your changes will be tested to ensure that there are no issues.
 - If changes need to be made, you will be notified via GitHub.
-- Once approved, your code will be merged to the appropriate `staging/*` branch based on the chart below:
-
-All pull requests must include a brief but descriptive title, and a description of the changes that you've made with as much detail as possible. **Only include commits that are related to your feature, bug fix, or patch in your pull request.**
-
-| Topic branches:              | Primary Target:             | Final destination:                    | 
-| -----------------------------|:---------------------------:|:-------------------------------------:|
-| **`feature/*`**              | `staging/features`          | `main`                                |
-| **`fix/*`**                  | `staging/fixes`             | `main` **and** `beta` *or* `release`  |
-| **`refactor/*`**             | `staging/refactoring`       | `main`                                |
-| **`test/*`**                 | `staging/tests`             | `main`                                |
-| **`doc/*`**                  | `staging/docs`              | `main`, `beta`, *or* `release`        |
-
-Our development and release cycles
------------------------
-### During the development cycle:
-- `topic/*` branches are submitted to our team via a pull request. Your changes will be reviewed and tested, and if all appropriate quality assurance checks pass the branch will be merged to the corresponding `staging/*` branch.
-
-- `staging/*` branches merge into `main` at various intervals throughout the development process.
-
-- When all planned features and fixes have been merged to `main`, the code is tested for regressions and bugs.
-
-- A snapshot of `main` is pushed to a temporary branch called `staging/refactoring`, and final code review, refactoring, and optimization takes place. Once complete, `staging/refactoring` merges back to `main` bringing the codebase up-to-date. All other `staging/*` branches synchronize with `main` at this time.
-
-- After final validation checks pass, our development team signs off on the release and the code is pushed from `main` to `beta`.
-
-### During the release cycle:
-- **What happens when code moves from `main` to `beta`**:<br>
-    - **No new feature requests will be approved**.
-    - `main` will receive an increment in it's version number signaling the start of a new development cycle.
-    - `fix/*` topic branches/commits will be cherry picked to `beta` as necessary.
-    - `staging/docs` will merge into `beta` prior to the code being pushed to `release` to bring documentation and supporting files up-to-date.
-
-- If all quality assurance checks pass, our development team will then:
-    - Sign off on the code in `beta`.
-    - Push the code to the `release` branch and create a corresponding version tag.
-    - Compile new packages and publish them to our APT repository. 
-    - **Notes:**
-        - `release` always contains the highest released version of Hestia Control Panel.
-        - For major releases, a `release/vX.x` branch will be created for maintenance and servicing purposes.
-
-
+- Once approved, your code will be merged for inclusion in an upcoming release of Hestia Control Panel.
 
+All pull requests must include a brief but descriptive title, and a detailed description of the changes that you've made. **Only include commits that are related to your feature, bug fix, or patch in your pull request!**
 
 Thank you!
 -----------------------

+ 14 - 5
README.md

@@ -2,7 +2,7 @@
 
 [Hestia Control Panel](https://www.hestiacp.com/)
 ==================================================
-**Latest stable release:** Version 1.3.0 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md)<br>
+**Latest stable release:** Version 1.3.1 | [View Changelog](https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md)<br>
 
 **Web:** [www.hestiacp.com](https://www.hestiacp.com/)<br>
 **Documentation:** [docs.hestiacp.com](https://docs.hestiacp.com/)<br>
@@ -19,17 +19,18 @@ Hestia Control Panel is designed to provide administrators an easy to use web an
 Features and Services
 ----------------------------
 * Apache2 and NGINX with PHP-FPM
-* Multiple PHP versions (5.6 - 7.4, 7.3 as default for optimal compatibility)
+* Multiple PHP versions (5.6 - 7.4, 7.4 as default)
 * DNS Server (Bind) with clustering capabilities
 * POP/IMAP/SMTP mail services with Anti-Virus, Anti-Spam, and Webmail (ClamAV, SpamAssassin, and Roundcube)
 * MariaDB or PostgreSQL databases
 * Let's Encrypt SSL support with wildcard certificates
 * Firewall with brute-force attack detection and IP lists (iptables, fail2ban, and ipset).
 
-Supported operating systems
+Supported platforms and operating systems
 ----------------------------
-* Debian 10, 9
-* Ubuntu 20.04 LTS, 18.04 LTS, or 16.04 LTS
+* **CPU Architecture:** AMD64 (x86_64 Intel/AMD)
+* **Debian:** 10, 9
+* **Ubuntu:** 20.04 LTS, 18.04 LTS, or 16.04 LTS
 * **NOTE:** Hestia Control Panel must be installed on top of a fresh operating system installation to ensure proper functionality.
 
 Installing Hestia Control Panel
@@ -65,6 +66,14 @@ bash hst-install.sh -h
 ```
 Alternatively, @gabizz has made available a command-line script generator at https://gabizz.github.io/hestiacp-scriptline-generator/ which allows you to easily generate the installation command via GUI.
 
+How to upgrade an existing installation
+============================
+Automatic Updates are enabled by default on new installations of Hestia Control Panel and can be managed from **Server Settings > Updates**. To manually check for and install available updates, use the apt package manager:
+```bash
+apt-get update
+apt-get upgrade
+```
+
 Issues
 =============================
 If you've run into a problem, [file a new issue report via GitHub](https://github.com/hestiacp/hestiacp/issues) so that we may investigate further.

+ 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
 

+ 57 - 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
 
@@ -97,10 +100,18 @@ fi
 
 
 
+# Dump debug info
+debug_log() {
+    echo -e "\n==[${1}]==\n${2}\n" >> "$log_file"
+}
+
 #----------------------------------------------------------#
 #                       Action                             #
 #----------------------------------------------------------#
 
+
+
+
 # Generate correct variables for mail domain SSL certificates
 if [ ! -z "$mail" ]; then
     root_domain=$domain
@@ -108,6 +119,17 @@ if [ ! -z "$mail" ]; then
     aliases="$WEBMAIL_ALIAS.$root_domain"
 fi
 
+log_file="/var/log/hestia/LE-${user}-${domain}-$(date +%Y%m%d-%H%M%S).log"
+touch "$log_file"
+chmod 600 "$log_file"
+
+echo -e "\n\n=============================
+WEB_SYSTEM: ${WEB_SYSTEM}
+PROXY_SYSTEM: ${PROXY_SYSTEM}
+user: ${user}
+domain: ${domain}
+" >> "$log_file"
+
 # Registering LetsEncrypt user account
 $BIN/v-add-letsencrypt-user $user
 if [ "$?" -ne 0  ]; then
@@ -131,6 +153,12 @@ else
     proto="http-01"
 fi
 
+echo -e "
+- aliases: ${aliases}
+- proto: ${proto}
+- wildcard: ${wildcard}
+" >> "$log_file"
+
 # Check if dns records exist for requested domain/aliases
 if [ "$proto" = "http-01" ]; then
     for identifier in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do
@@ -161,6 +189,9 @@ fi
 answer=$(curl -s -I "$LE_API/directory")
 nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
 status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
+
+debug_log "Step 1" "- status: ${status}\n- nonce: ${nonce}\n- answer: ${answer}"
+
 if [[ "$status" -ne 200 ]]; then
     # Delete DNS CAA record
     if [ ! -z "$DNS_SYSTEM" ]; then
@@ -189,6 +220,9 @@ nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
 authz=$(echo "$answer" |grep "acme/authz" |cut -f2 -d '"')
 finalize=$(echo "$answer" |grep 'finalize":' |cut -f4 -d '"')
 status=$(echo "$answer" |grep HTTP/ |tail -n1 |cut -f2 -d ' ')
+
+debug_log "Step 2" "- status: ${status}\n- nonce: ${nonce}\n- authz: ${authz}\n- finalize: ${finalize}\n- payload: ${payload}\n- answer: ${answer}"
+
 if [[ "$status" -ne 201 ]]; then
     # Delete DNS CAA record
     if [ ! -z "$DNS_SYSTEM" ]; then
@@ -209,6 +243,9 @@ for auth in $authz; do
     token=$(echo "$answer" |grep -A3 $proto |grep token |cut -f 4 -d \")
     nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
     status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
+
+    debug_log "Step 3" "- status: ${status}\n- nonce: ${nonce}\n- url: ${url}\n- token: ${token}\n- answer: ${answer}"
+
     if [[ "$status" -ne 200 ]]; then
         # Delete DNS CAA record
         if [ ! -z "$DNS_SYSTEM" ]; then
@@ -300,6 +337,9 @@ for auth in $authz; do
         nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
         status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
         details=$(echo "$answer"| grep detail | cut -f 1 -d ',' | cut -f 2-4 -d ':' | cut -f 2 -d '"')
+
+        debug_log "Step 5" "- status: ${status}\n- nonce: ${nonce}\n- validation: ${validation}\n- details: ${details}\n- answer: ${answer}"
+
         if [[ "$status" -ne 200 ]]; then
             # Delete DNS CAA record
             if [ ! -z "$DNS_SYSTEM" ]; then
@@ -312,6 +352,7 @@ for auth in $authz; do
                     fi
                 fi
             fi
+            debug_log "Abort Step 5" "=> Wrong status"
             check_result $E_CONNECT "Let's Encrypt validation status $status. Details: $details"
         fi
 
@@ -328,6 +369,7 @@ for auth in $authz; do
                     fi
                 fi
             fi
+            debug_log "Abort Step 5" "=> Too many validation retries"
             check_result $E_CONNECT "Let's Encrypt domain validation timeout"
         fi
         sleep $((i*2))
@@ -359,6 +401,9 @@ answer=$(query_le_v2 "$finalize" "$payload" "$nonce")
 nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
 status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
 certificate=$(echo "$answer"|grep 'certificate":' |cut -f4 -d '"')
+
+debug_log "Step 6" "- status: ${status}\n- nonce: ${nonce}\n- payload: ${payload}\n- certificate: ${certificate}\n- answer: ${answer}"
+
 if [[ "$status" -ne 200 ]]; then
     [ -d "$ssl_dir" ] && rm -rf "$ssl_dir"
     check_result $E_CONNECT "Let's Encrypt finalize bad status $status"
@@ -367,6 +412,12 @@ fi
 # Downloading signed certificate / STEP 7
 answer=$(query_le_v2 "$certificate" "" "$nonce" "$ssl_dir/$domain.pem")
 status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
+
+debug_log "Step 7" "- status: ${status}\n- answer: ${answer}"
+debug_log "CERT DIR" "$(ls -las "$ssl_dir/")"
+debug_log "CERT PEM" "$(cat "$ssl_dir/$domain.pem")"
+
+
 if [[ "$status" -ne 200 ]]; then
     [ -d "$ssl_dir" ] && rm -rf "$ssl_dir"
     check_result $E_NOTEXIST "Let's Encrypt downloading signed cert failed status:$status"
@@ -381,10 +432,13 @@ ca_end=$(grep -n  "BEGIN" $ssl_dir/$domain.pem |tail -n1 |cut -f 1 -d :)
 ca_end=$(( pem_lines - crt_end + 1 ))
 tail -n $ca_end $ssl_dir/$domain.pem > $ssl_dir/$domain.ca
 
+debug_log "CERT CRT" "$(cat "$ssl_dir/$domain.crt")"
+debug_log "CERT CA-1" "$(cat "$ssl_dir/$domain.ca")"
 # Temporary fix for double "END CERTIFICATE"
 if [[ $(head -n 1 $ssl_dir/$domain.ca) = "-----END CERTIFICATE-----" ]]; then
     sed -i '1,2d' $ssl_dir/$domain.ca
 fi
+debug_log "CERT CA-2" "$(cat "$ssl_dir/$domain.ca")"
 
 # Rename certs for mail
 if [ ! -z "$mail" ]; then
@@ -464,4 +518,7 @@ send_notice 'LETSENCRYPT' "$domain SSL has been installed successfully"
 # Logging
 log_event "$OK" "$ARGUMENTS"
 
+# Cleanup debug since the SSL was issues succesfully
+rm -f "$log_file"
+
 exit

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

@@ -1,6 +1,9 @@
 #!/bin/bash
 # info: add letsencrypt for host and backend
-# options:
+# options: NONE
+# labels: hestia
+#
+# example: v-add-letsencrypt-host
 #
 # 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 [email protected]
 #
 # 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 [email protected]
 #
 # 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 [email protected]
 #
 # 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.
 

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