Explorar o código

Sync with upstream development branch

Kristan Kenney %!s(int64=6) %!d(string=hai) anos
pai
achega
77ce6b6703

+ 42 - 0
CONTRIBUTING.md

@@ -0,0 +1,42 @@
+How to Contribute
+==================================================
+
+Do you want to contribute to the Hestia Control Panel project? The easiest way to get started is to [submit an issue report](https://github.com/hestiacp/hestia/issues) if you come across a bug or issue. If you're a developer, please feel free to submit a patch/pull request with a fix. 
+
+**We appreciate all contributions to our project; it is with the help of the open-source community that we are able to build a product that meets users needs.**
+
+Code Contributions & Pull Requests - Guidelines
+-----------------------
+
+**All pull requests must include:**
+1. A brief but descriptive title, such as **Fixed typo in php.ini** or **Updated rebuild_mail_conf function in rebuild.sh**.
+2. A detailed description of the changes that you've made.
+   1. Example: "Apache subdomain configuration was incorrect, modified variables in templates to point to the correct files."
+3. Only commits which are related to the pull request or issue itself.
+
+### Code formatting and comments:
+We ask that you try to follow existing naming schemes and coding conventions as much as possible, and that you please add brief but descriptive comments in your source code to aid other developers in debugging and understanding your code in the future.
+
+### Squashing commits for smaller changes:
+When submitting a pull request with multiple smaller commits which are related to the same issue (or file), we ask that you please **squash your commits** in order to keep the project's commit history clean and easy to follow for other developers.
+
+### Working with branches:
+Development for this project takes place in branches to effectively develop, manage, and test manage new features and code changes, ensuring that that each release meets high quality standards. There are two main branches which have a never-ending life cycle:
+
+* **master**:Latest stable release code (install packages align with this branch)
+* **develop**: Primary development branch containing code for the next release.
+
+If you are submitting a fix for a critical issue (such as security or broken functionality) in the current release, please create a branch with the prefix **hotfix-** starting from **master** for your work and submit a pull request with **[CRITICAL]** in the title.
+
+For all other changes, we ask that you create a new branch based on **develop**. Please follow the below naming conventions for your work and submit a pull request when it has been completed. Once reviewed and approved, our development team will merge your code into the primary development branch.
+
+* **feature-**: New features
+* **bugfix-**: Fixes for non-critical bugs
+* **secfix-**: Fixes for non-critical security issues
+* **webui-**: Control Panel user experience and interface changes
+
+**Please ensure that all pull requests meet the guidelines listed above; those that do not will be rejected and sent back for review.**
+
+Donations
+-----------------------
+If you would like to make a donation to the Hestia Control Panel project to further its development (or if you'd like to buy our developers a lunch), please feel free to do so via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ST87LQH2CHGLA).

+ 3 - 0
ISSUE_TEMPLATE.md

@@ -15,6 +15,9 @@ Type here (e.g. Ubuntu 18.04 LTS)
 ### HestiaCP Version:
 Type here (e.g. 0.9.8-29)
 
+### Which branch are you using?
+Type here (e.g master, develop, etc.)
+
 ### What software is installed?
 Type here (e.g. Apache, Nginx, PHP-FPM, Dovecot/Exim, MariaDB, etc.)
 

+ 67 - 23
README.md

@@ -1,43 +1,55 @@
 [Hestia Control Panel](https://www.hestiacp.com/)
 ==================================================
 
-Disclaimer
+**Pre-Release Software Information**
 ----------------------------
-**Hestia Control Panel is in active development and has been made available as a pre-release beta.**<br>
-**Please use caution if you choose to use this software in a production environment.**
+**Hestia Control Panel is undergoing rapid changes in development. As such, it is important to note that:**
+* Current builds are released as a beta and are intended for development and testing purposes only.
+* This software should not be used on production systems without understanding the risks.
+* By using this software, you acknowledge and accept that bugs or issues could occur at any time.
+* By using this software, you acknowledge and accept that changes to the functionality or user interface are likely during the course of development.
 
 What is Hestia Control Panel?
 ----------------------------
 * An open source web server control panel with an easy-to-use interface.
 * A lightweight alternative to cPanel, Plesk, etc.
 
-What features does Hestia Control Panel support?
+What does Hestia Control Panel support?
 ----------------------------
-* Web Server (Apache/Nginx) with PHP
-* DNS Server (Bind)
-* Mail Server (Exim/Dovecot) with Anti-Virus and Spam Filtering (ClamAV and SpamAssassin)
-* Database Server (MariaDB/PostgreSQL)
+* Standard Web Server (apache2/nginx) with PHP
+* PHP Web Application Server (nginx + php-fpm)
+* Multiple PHP versions (5.6 - 7.3)
+* DNS Server (Bind) with clustering capabilities
+* Mail Server (Exim/Dovecot) with Anti-Virus and Anti-Spam (ClamAV and SpamAssassin)
+* Database functionality (MariaDB/PostgreSQL)
+* Let's Encrypt SSL with wildcard certificates
 
-System Requirements:
+Supported operating systems:
 ----------------------------
 * Debian 8 or 9
 * Ubuntu 16.04 LTS or Ubuntu 18.04 LTS
-* **NOTE:** Hestia Control Panel must be installed on a "clean" operating system to ensure proper functionality.
+* **NOTE:** Hestia Control Panel must be installed on top of a fresh operating system installation to ensure proper functionality.
 
-How to install:
-----------------------------
-Log in to your server as root, either directly or via SSH:
+Installing Hestia Control Panel
+============================
+## Step 1: Log in
+To install Hestia Control Panel on your server, you will need to be logged in as **root** either directly from the command line console or remotely via SSH:
 ```bash
 ssh root@your.server
 ```
-Download the installation script:
+## Step 2: Download
+Download the installation script for the latest release:
 ```bash
 wget https://raw.githubusercontent.com/hestiacp/hestiacp/master/install/hst-install.sh
 ```
-Run the installation script and follow the on-screen instructions:
+## Step 3: Run
+To begin the installation process, simply run the script and follow the on-screen prompts:
 ```bash
 bash hst-install.sh
 ```
+You will receive a welcome email at the address specified during installation (if applicable) and on-screen instructions after the installation is completed to log in and access your server.
+
+## Additional installation notes:
 To perform an unattended installation using the default options:
 ```bash
 bash hst-install.sh -f -y no -e <email> -p <password> -s <hostname>
@@ -46,20 +58,52 @@ For additional installation options:
 ```bash
 bash hst-install.sh -h
 ```
-Reporting bugs & issues:
-----------------------------
+
+Installing development builds
+=============================
+To install a development build based on the latest published code, you must first have an existing installation of Hestia available. If you do not have a server configured, please install the latest stable build using the instructions above before continuing.
+
+**Development builds should not be installed on systems with live production data.**
+
+## Step 1: Download the compiler script
+```bash
+wget https://raw.githubusercontent.com/hestiacp/hestiacp/develop/src/hst_autocompile.sh
+```
+## Step 2: Compile and install the desired build:
+```bash
+bash hst_autocompile.sh --packageset <branchname> <yes|no>
+```
+**Valid options for *packageset* flag include:**
+* all
+* hestia
+* nginx
+* php
+
+For example, to install only the Control Panel itself built from the main development branch (**develop**): 
+```bash
+bash hst_autocompile.sh --hestia develop yes
+```
+
+**Important:** Updates which have been released via the Hestia package repositories and upgraded through **apt** will replace installations which use the above method. 
+
+Reporting Issues
+=============================
 If you've run into an issue with Hestia Control Panel, please let us know as soon as possible so that we may investigate further and resolve any issues in a timely manner.
 
-Bug reports can be filed using GitHub's [Issues](https://github.com/hestiacp/hestiacp/issues) feature located at the top of our repository.
+Bug reports can be filed using GitHub's [Issues](https://github.com/hestiacp/hestiacp/issues) feature.
 
-License:
-----------------------------
-Hestia Control Panel is licensed under [GPL v3](https://github.com/hestiacp/hestiacp/blob/master/LICENSE) license, and is based on VestaCP.<br>
+Contributions
+=============================
+If you would like to contribute to the project, please [read our submission guidelines](https://github.com/hestiacp/hestiacp/blob/master/CONTRIBUTING.md) for a brief overview of our development processes and standards.
 
-How to support Hestia Control Panel:
-----------------------------
+Donations
+=============================
 Hestia Control Panel is open source and completely free for everyone to use.
 
 If you would like to help our developers cover their time and infrastucture costs, or to support the Hestia Control Panel project as a whole, please consider making a donation via PayPal.
 
 [![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ST87LQH2CHGLA)
+
+License
+=============================
+Hestia Control Panel is licensed under [GPL v3](https://github.com/hestiacp/hestiacp/blob/master/LICENSE) license, and is based on the [VestaCP](https://www.vestacp.com/) project.<br>

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

@@ -69,6 +69,11 @@ for user in $(grep "$HOMEDIR" /etc/passwd |egrep "$shells" |cut -f 1 -d:); do
     $BIN/v-add-user-sftp-jail $user
 done
 
+# Add v-add-sys-sftp-jail to startup
+if [ ! -e "/etc/cron.d/hestia-sftp" ]; then
+    echo "@reboot /usr/local/hestia/bin/v-add-sys-sftp-jail" > /etc/cron.d/hestia-sftp
+fi
+
 #----------------------------------------------------------#
 #                       Hestia                             #
 #----------------------------------------------------------#

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

@@ -38,7 +38,7 @@ ssh_users=$(grep -A1 "^# Hestia SFTP Chroot" /etc/ssh/sshd_config | sed -n 2p |
 IFS=',' read -r -a users <<< "$ssh_users"
 
 # Check if jail is already enabled
-if [[ ! " ${users[@]} " =~ " ${user} " ]]; then
+if [[ " ${users[@]} " =~ " ${user} " ]]; then
     exit
 fi
 
@@ -54,6 +54,8 @@ users+=($user)
 users=$(IFS=',';echo "${users[*]// /|}";IFS=$' \t\n')
 sed -i "s/$ssh_users/$users/g" /etc/ssh/sshd_config
 
+# Set home folder permission to root
+chown root:root /home/$user
 
 #----------------------------------------------------------#
 #                       Hestia                             #

+ 5 - 0
bin/v-delete-sys-sftp-jail

@@ -65,6 +65,11 @@ if [ "$restart" = 'yes' ]; then
     fi
 fi
 
+# Remove v-add-sys-sftp-jail to startup
+if [ ! -e "/etc/cron.d/hestia-sftp" ]; then
+    rm -f /etc/cron.d/hestia-sftp
+fi
+
 
 #----------------------------------------------------------#
 #                       Hestia                             #

+ 1 - 1
install/hst-install-debian.sh

@@ -330,7 +330,7 @@ tmpfile=$(mktemp -p /tmp)
 dpkg --get-selections > $tmpfile
 for pkg in exim4 mariadb-server apache2 nginx hestia postfix; do
     if [ ! -z "$(grep $pkg $tmpfile)" ]; then
-        conflicts="$pkg $conflicts"
+        conflicts="$pkg* $conflicts"
     fi
 done
 rm -f $tmpfile

+ 1 - 1
install/hst-install-ubuntu.sh

@@ -307,7 +307,7 @@ tmpfile=$(mktemp -p /tmp)
 dpkg --get-selections > $tmpfile
 for pkg in exim4 mariadb-server apache2 nginx hestia postfix ufw; do
     if [ ! -z "$(grep $pkg $tmpfile)" ]; then
-        conflicts="$pkg $conflicts"
+        conflicts="$pkg* $conflicts"
     fi
 done
 rm -f $tmpfile

+ 3 - 3
src/deb/php/php.ini

@@ -549,7 +549,7 @@ report_memleaks = On
 ; Development Value: On
 ; Production value: On
 ; http://php.net/html-errors
-html_errors = On
+;html_errors = On
 
 ; If html_errors is set to On *and* docref_root is not empty, then PHP
 ; produces clickable error messages that direct to a page describing the error
@@ -1907,10 +1907,10 @@ ldap.max_links = -1
 ;opcache.huge_code_pages=1
 
 ; Validate cached file permissions.
-;opcache.validate_permission=0
+opcache.validate_permission=1
 
 ; Prevent name collisions in chroot'ed environment.
-;opcache.validate_root=0
+opcache.validate_root=1
 
 ; If specified, it produces opcode dumps for debugging different stages of
 ; optimizations.