Browse Source

Merge branch 'prerelease'

Kristan Kenney 6 years ago
parent
commit
465c0f49d7

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

@@ -132,7 +132,7 @@ fi
 # Add webmail configuration to mail domain
 # Add webmail configuration to mail domain
 if [ ! -z "$WEB_SYSTEM" ] || [ ! -z "$PROXY_SYSTEM" ]; then
 if [ ! -z "$WEB_SYSTEM" ] || [ ! -z "$PROXY_SYSTEM" ]; then
     if [ ! -z "$IMAP_SYSTEM" ]; then
     if [ ! -z "$IMAP_SYSTEM" ]; then
-        $BIN/v-add-webmail $user $domain ''
+        $BIN/v-add-sys-webmail $user $domain ''
     fi
     fi
 fi
 fi
     
     

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


+ 2 - 2
bin/v-change-sys-webmail

@@ -27,7 +27,7 @@ NEW_ALIAS=$1
 # Delete old webmail configuration
 # Delete old webmail configuration
 for user in `ls /usr/local/hestia/data/users/`; do
 for user in `ls /usr/local/hestia/data/users/`; do
     for domain in $($BIN/v-list-web-domains $user plain |cut -f 1); do
     for domain in $($BIN/v-list-web-domains $user plain |cut -f 1); do
-        $BIN/v-delete-webmail $user $domain
+        $BIN/v-delete-sys-webmail $user $domain
     done
     done
 done
 done
 
 
@@ -36,7 +36,7 @@ $BIN/v-change-sys-config-value 'WEBMAIL_ALIAS' $NEW_ALIAS
 
 
 for user in `ls /usr/local/hestia/data/users/`; do
 for user in `ls /usr/local/hestia/data/users/`; do
     for domain in $($BIN/v-list-web-domains $user plain |cut -f 1); do
     for domain in $($BIN/v-list-web-domains $user plain |cut -f 1); do
-        $BIN/v-add-webmail $user $domain
+        $BIN/v-add-sys-webmail $user $domain
     done
     done
 done
 done
 
 

+ 1 - 1
bin/v-delete-mail-domain

@@ -69,7 +69,7 @@ fi
 
 
 # Delete webmail configuration if it exists
 # Delete webmail configuration if it exists
 if [ ! -z "$WEB_SYSTEM" ] || [ ! -z "$PROXY_SYSTEM" ]; then
 if [ ! -z "$WEB_SYSTEM" ] || [ ! -z "$PROXY_SYSTEM" ]; then
-    $BIN/v-delete-webmail $user $domain 'yes'
+    $BIN/v-delete-sys-webmail $user $domain 'yes'
 fi
 fi
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

+ 0 - 0
bin/v-delete-webmail → bin/v-delete-sys-webmail


+ 34 - 54
bin/v-list-sys-hestia-updates

@@ -15,7 +15,7 @@ format=${1-shell}
 # Includes
 # Includes
 source $HESTIA/func/main.sh
 source $HESTIA/func/main.sh
 source $HESTIA/conf/hestia.conf
 source $HESTIA/conf/hestia.conf
-fields="\$NAME \$VERSION \$RELEASE \$ARCH \$UPDATED \$DESCR \$TIME \$DATE"
+fields="\$NAME \$VERSION \$ARCH \$UPDATED \$DESCR \$TIME \$DATE"
 
 
 # JSON list function
 # JSON list function
 json_list() {
 json_list() {
@@ -27,7 +27,6 @@ json_list() {
         eval $str
         eval $str
         echo -n '    "'$NAME'": {
         echo -n '    "'$NAME'": {
         "VERSION": "'$VERSION'",
         "VERSION": "'$VERSION'",
-        "RELEASE": "'$RELEASE'",
         "ARCH": "'$ARCH'",
         "ARCH": "'$ARCH'",
         "UPDATED": "'$UPDATED'",
         "UPDATED": "'$UPDATED'",
         "DESCR": "'$DESCR'",
         "DESCR": "'$DESCR'",
@@ -47,11 +46,11 @@ json_list() {
 # SHELL list function
 # SHELL list function
 shell_list() {
 shell_list() {
     IFS=$'\n'
     IFS=$'\n'
-    echo "PKG   VER   REL   ARCH   UPDT   DATE"
-    echo "---   ---   ---   ----   ----   ----"
+    echo "PKG   VER   ARCH   UPDT   DATE"
+    echo "---   ---   ----   ----   ----"
     for str in $(echo -e "$data"); do
     for str in $(echo -e "$data"); do
         eval $str
         eval $str
-        echo "$NAME $VERSION $RELEASE $ARCH $UPDATED $DATE"
+        echo "$NAME $VERSION $ARCH $UPDATED $DATE"
     done
     done
 }
 }
 
 
@@ -66,71 +65,52 @@ nginx_v=$(apt-cache policy hestia-nginx | grep Candidate | cut -d ':' -f 2 | xar
 php_v=$(apt-cache policy hestia-php | grep Candidate | cut -d ':' -f 2 | xargs)
 php_v=$(apt-cache policy hestia-php | grep Candidate | cut -d ':' -f 2 | xargs)
 
 
 # Checking installed hestia version
 # Checking installed hestia version
-if [ -d "/etc/sysconfig" ]; then
-    rpm_format="VERSION='%{VERSION}'"
-    rpm_format="$rpm_format RELEASE='%{RELEASE}'"
-    rpm_format="$rpm_format ARCH='%{ARCH}'"
-    rpm_format="$rpm_format UTIME='%{INSTALLTIME}'\n"
-    eval $(rpm --queryformat="$rpm_format" -q hestia)
-    DATE=$(date -d @$UTIME +%F)
-    TIME=$(date -d @$UTIME +%T)
-else
-    dpkg_data=$(dpkg-query -s hestia)
-    pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/hestia.list)
-    ARCH=$(echo "$dpkg_data"|grep Architecture |cut -f 2 -d ' ')
-    VERSION=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 1 -d \-)
-    RELEASE=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 2 -d \-)
-    DATE=$(date -d @$pkg_date +"%F")
-    TIME=$(date -d @$pkg_date +"%T")
-fi
+dpkg_data=$(dpkg-query -s hestia)
+pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/hestia.list)
+ARCH=$(echo "$dpkg_data"|grep Architecture |cut -f 2 -d ' ')
+VERSION=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 1 -d \-)
+DATE=$(date -d @$pkg_date +"%F")
+TIME=$(date -d @$pkg_date +"%T")
+
 UPDATED='yes'
 UPDATED='yes'
-if [ ! -z "$hesta_v" ] && [ "$hestia_v" \> "$VERSION-$RELEASE" ]; then
+if [ ! -z "$hesta_v" ] && [ "$hestia_v" \> "$VERSION" ]; then
     UPDATED='no'
     UPDATED='no'
 fi
 fi
-data="NAME='hestia' VERSION='$VERSION' RELEASE='$RELEASE' ARCH='$ARCH'"
+
+data="NAME='hestia' VERSION='$VERSION' ARCH='$ARCH'"
 data="$data UPDATED='$UPDATED' DESCR='core package' TIME='$TIME' DATE='$DATE'"
 data="$data UPDATED='$UPDATED' DESCR='core package' TIME='$TIME' DATE='$DATE'"
 
 
 # Checking installed hestia-php version
 # Checking installed hestia-php version
-if [ -d "/etc/sysconfig" ]; then
-    eval $(rpm --queryformat="$rpm_format" -q hestia-php)
-    DATE=$(date -d @$UTIME +%F)
-    TIME=$(date -d @$UTIME +%T)
-else
-    dpkg_data=$(dpkg-query -s hestia-php)
-    pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/hestia-php.list)
-    ARCH=$(echo "$dpkg_data"|grep Architecture | cut -f 2 -d ' ')
-    VERSION=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 1 -d \-)
-    RELEASE=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 2 -d \-)
-    DATE=$(date -d @$pkg_date +"%F")
-    TIME=$(date -d @$pkg_date +"%T")
-fi
+dpkg_data=$(dpkg-query -s hestia-php)
+pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/hestia-php.list)
+ARCH=$(echo "$dpkg_data"|grep Architecture | cut -f 2 -d ' ')
+VERSION=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 1 -d \-)
+DATE=$(date -d @$pkg_date +"%F")
+TIME=$(date -d @$pkg_date +"%T")
+
 UPDATED='yes'
 UPDATED='yes'
-if [ ! -z "$php_v" ] && [ "$php_v" \> "$VERSION-$RELEASE" ]; then
+if [ ! -z "$php_v" ] && [ "$php_v" \> "$VERSION" ]; then
     UPDATED='no'
     UPDATED='no'
 fi
 fi
-data="$data\nNAME='hestia-php' VERSION='$VERSION' RELEASE='$RELEASE'"
+
+data="$data\nNAME='hestia-php' VERSION='$VERSION'"
 data="$data ARCH='$ARCH' UPDATED='$UPDATED' DESCR='php interpreter'"
 data="$data ARCH='$ARCH' UPDATED='$UPDATED' DESCR='php interpreter'"
 data="$data TIME='$TIME' DATE='$DATE'"
 data="$data TIME='$TIME' DATE='$DATE'"
 
 
 # Checking installed hestia-nginx version
 # Checking installed hestia-nginx version
-if [ -d "/etc/sysconfig" ]; then
-    eval $(rpm --queryformat="$rpm_format" -q hestia-nginx)
-    DATE=$(date -d @$UTIME +%F)
-    TIME=$(date -d @$UTIME +%T)
-else
-    dpkg_data=$(dpkg-query -s hestia-nginx)
-    pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/hestia-nginx.list)
-    ARCH=$(echo "$dpkg_data"|grep Architecture | cut -f 2 -d ' ')
-    VERSION=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 1 -d \-)
-    RELEASE=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 2 -d \-)
-    DATE=$(date -d @$pkg_date +"%F")
-    TIME=$(date -d @$pkg_date +"%T")
-fi
+dpkg_data=$(dpkg-query -s hestia-nginx)
+pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/hestia-nginx.list)
+ARCH=$(echo "$dpkg_data"|grep Architecture | cut -f 2 -d ' ')
+VERSION=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 1 -d \-)
+DATE=$(date -d @$pkg_date +"%F")
+TIME=$(date -d @$pkg_date +"%T")
+
 UPDATED='yes'
 UPDATED='yes'
-if [ ! -z "$nginx_v" ] && [ "$nginx_v" \> "$VERSION-$RELEASE" ]; then
+if [ ! -z "$nginx_v" ] && [ "$nginx_v" \> "$VERSION" ]; then
     UPDATED='no'
     UPDATED='no'
 fi
 fi
-data="$data\nNAME='hestia-nginx' VERSION='$VERSION' RELEASE='$RELEASE'"
+
+data="$data\nNAME='hestia-nginx' VERSION='$VERSION'"
 data="$data ARCH='$ARCH' UPDATED='$UPDATED' DESCR='internal web server'"
 data="$data ARCH='$ARCH' UPDATED='$UPDATED' DESCR='internal web server'"
 data="$data TIME='$TIME' DATE='$DATE'"
 data="$data TIME='$TIME' DATE='$DATE'"
 
 

+ 2 - 2
bin/v-rebuild-mail-domain

@@ -46,8 +46,8 @@ rebuild_mail_domain_conf
 # Rebuild webmail configuration
 # Rebuild webmail configuration
 if [ ! -z "$WEB_SYSTEM" ] || [ ! -z "$PROXY_SYSTEM" ]; then
 if [ ! -z "$WEB_SYSTEM" ] || [ ! -z "$PROXY_SYSTEM" ]; then
     if [ ! -z "$IMAP_SYSTEM" ]; then
     if [ ! -z "$IMAP_SYSTEM" ]; then
-        $BIN/v-delete-webmail $user $domain ''
-        $BIN/v-add-webmail $user $domain ''
+        $BIN/v-delete-sys-webmail $user $domain ''
+        $BIN/v-add-sys-webmail $user $domain ''
     fi
     fi
 fi
 fi
 
 

+ 2 - 2
bin/v-rebuild-mail-domains

@@ -50,8 +50,8 @@ for domain in $(search_objects 'mail' 'SUSPENDED' "*" 'DOMAIN'); do
     rebuild_mail_domain_conf
     rebuild_mail_domain_conf
     if [ ! -z "$WEB_SYSTEM" ] || [ ! -z "$PROXY_SYSTEM" ]; then
     if [ ! -z "$WEB_SYSTEM" ] || [ ! -z "$PROXY_SYSTEM" ]; then
         if [ ! -z "$IMAP_SYSTEM" ]; then
         if [ ! -z "$IMAP_SYSTEM" ]; then
-            $BIN/v-delete-webmail $user $domain ''
-            $BIN/v-add-webmail $user $domain ''
+            $BIN/v-delete-sys-webmail $user $domain ''
+            $BIN/v-add-sys-webmail $user $domain ''
         fi
         fi
     fi
     fi
 done
 done

+ 1 - 1
bin/v-suspend-mail-domain

@@ -48,7 +48,7 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
 fi
 fi
 
 
 # Removing webmail configuration
 # Removing webmail configuration
-$BIN/v-delete-webmail $user $domain 'yes'
+$BIN/v-delete-sys-webmail $user $domain 'yes'
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Hestia                             #
 #                       Hestia                             #

+ 1 - 1
bin/v-unsuspend-mail-domain

@@ -57,7 +57,7 @@ decrease_user_value "$user" '$SUSPENDED_MAIL'
 
 
 # Enable webmail access
 # Enable webmail access
 if [ ! -z "$IMAP_SYSTEM" ]; then
 if [ ! -z "$IMAP_SYSTEM" ]; then
-    $BIN/v-add-webmail $user $domain 'yes'
+    $BIN/v-add-sys-webmail $user $domain 'yes'
 fi
 fi
 # Logging
 # Logging
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"

+ 6 - 20
bin/v-update-sys-hestia

@@ -28,31 +28,17 @@ source $HESTIA/conf/hestia.conf
 # Checking arg number
 # Checking arg number
 check_args '1' "$#" 'PACKAGE'
 check_args '1' "$#" 'PACKAGE'
 
 
-
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-if [ -d "/etc/sysconfig" ]; then
-    # Clean yum chache
-    yum -q clean all
-
-    # Define yum cmd
-    yum="yum -q -y --noplugins --disablerepo=* --enablerepo=hestia"
-
-    # Update hestia package
-    $yum update $package > /dev/null 2>&1
-    check_result $? "$package update failed" $E_UPDATE
-else
-    # Update repo
-    apt-get update -o Dir::Etc::sourcelist="sources.list.d/hestia.list" \
-        -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" -qq
-
-    # Update hestia package
-    apt-get install $package -qq > /dev/null 2>&1
-    check_result $? "$package update failed" $E_UPDATE
-fi
+# Update repo
+apt-get update -o Dir::Etc::sourcelist="sources.list.d/hestia.list" \
+    -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" -qq
 
 
+# Update hestia package
+apt-get install $package -qq > /dev/null 2>&1
+check_result $? "$package update failed" $E_UPDATE
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Hestia                             #
 #                       Hestia                             #

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

@@ -414,7 +414,7 @@ echo
 echo '                      Hestia Control Panel'
 echo '                      Hestia Control Panel'
 echo '                                    v1.0.3'
 echo '                                    v1.0.3'
 echo -e "\n"
 echo -e "\n"
-echo "=============================================================================="
+echo "===================================================================="
 echo -e "\n"
 echo -e "\n"
 echo 'The following server components will be installed on your system:'
 echo 'The following server components will be installed on your system:'
 echo
 echo
@@ -480,13 +480,13 @@ fi
 
 
 # Firewall stack
 # Firewall stack
 if [ "$iptables" = 'yes' ]; then
 if [ "$iptables" = 'yes' ]; then
-    echo -n '   - Iptables Firewall'
+    echo -n '   - Firewall (Iptables)'
 fi
 fi
 if [ "$iptables" = 'yes' ] && [ "$fail2ban" = 'yes' ]; then
 if [ "$iptables" = 'yes' ] && [ "$fail2ban" = 'yes' ]; then
     echo -n ' + Fail2Ban Access Monitor'
     echo -n ' + Fail2Ban Access Monitor'
 fi
 fi
 echo -e "\n"
 echo -e "\n"
-echo "=============================================================================="
+echo "===================================================================="
 echo -e "\n"
 echo -e "\n"
 
 
 # Asking for confirmation to proceed
 # Asking for confirmation to proceed
@@ -1830,7 +1830,7 @@ if [ "$host_ip" = "$ip" ]; then
 fi
 fi
 
 
 echo -e "\n"
 echo -e "\n"
-echo "=============================================================================="
+echo "===================================================================="
 echo -e "\n"
 echo -e "\n"
 
 
 # Sending notification to admin email
 # Sending notification to admin email

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

@@ -392,7 +392,7 @@ echo
 echo '                      Hestia Control Panel'
 echo '                      Hestia Control Panel'
 echo '                                    v1.0.3'
 echo '                                    v1.0.3'
 echo -e "\n"
 echo -e "\n"
-echo "=============================================================================="
+echo "===================================================================="
 echo -e "\n"
 echo -e "\n"
 echo 'The following server components will be installed on your system:'
 echo 'The following server components will be installed on your system:'
 echo
 echo
@@ -458,13 +458,13 @@ fi
 
 
 # Firewall stack
 # Firewall stack
 if [ "$iptables" = 'yes' ]; then
 if [ "$iptables" = 'yes' ]; then
-    echo -n '   - Iptables Firewall'
+    echo -n '   - Firewall (Iptables)'
 fi
 fi
 if [ "$iptables" = 'yes' ] && [ "$fail2ban" = 'yes' ]; then
 if [ "$iptables" = 'yes' ] && [ "$fail2ban" = 'yes' ]; then
     echo -n ' + Fail2Ban Access Monitor'
     echo -n ' + Fail2Ban Access Monitor'
 fi
 fi
 echo -e "\n"
 echo -e "\n"
-echo "=============================================================================="
+echo "===================================================================="
 echo -e "\n"
 echo -e "\n"
 
 
 # Asking for confirmation to proceed
 # Asking for confirmation to proceed
@@ -1725,7 +1725,7 @@ if [ "$host_ip" = "$ip" ]; then
 fi
 fi
 
 
 echo -e "\n"
 echo -e "\n"
-echo "=============================================================================="
+echo "===================================================================="
 echo -e "\n"
 echo -e "\n"
 
 
 # Sending notification to admin email
 # Sending notification to admin email

+ 1 - 1
src/deb/nginx/control

@@ -1,7 +1,7 @@
 Source: hestia-nginx
 Source: hestia-nginx
 Package: hestia-nginx
 Package: hestia-nginx
 Priority: optional
 Priority: optional
-Version: 1.16.0
+Version: 1.17.1
 Section: admin
 Section: admin
 Maintainer: HestiaCP <info@hestiacp.com>
 Maintainer: HestiaCP <info@hestiacp.com>
 Homepage: https://www.hestiacp.com
 Homepage: https://www.hestiacp.com

+ 2 - 2
src/hst_autocompile.sh

@@ -86,11 +86,11 @@ fi
 
 
 BUILD_ARCH='amd64'
 BUILD_ARCH='amd64'
 HESTIA_V="${BUILD_VER}_${BUILD_ARCH}"
 HESTIA_V="${BUILD_VER}_${BUILD_ARCH}"
-NGINX_V='1.17.1'
+NGINX_V=$(curl -s https://raw.githubusercontent.com/hestiacp/hestiacp/$branch/src/deb/nginx/control |grep "Version:" |cut -d' ' -f2)
 OPENSSL_V='1.1.1b'
 OPENSSL_V='1.1.1b'
 PCRE_V='8.43'
 PCRE_V='8.43'
 ZLIB_V='1.2.11'
 ZLIB_V='1.2.11'
-PHP_V='7.3.6'
+PHP_V=$(curl -s https://raw.githubusercontent.com/hestiacp/hestiacp/$branch/src/deb/php/control |grep "Version:" |cut -d' ' -f2)
 
 
 # Create build directories
 # Create build directories
 rm -rf $BUILD_DIR
 rm -rf $BUILD_DIR

+ 1 - 1
web/templates/admin/list_dns_rec.html

@@ -81,7 +81,7 @@ v_unit_id="<?=$key?>" v_section="dns_rec">
                       <i class="fas fa-trash status-icon red status-icon dim do_delete"></i>
                       <i class="fas fa-trash status-icon red status-icon dim do_delete"></i>
                       <input type="hidden" name="delete_url" value="/delete/dns/?domain=<?=htmlspecialchars($_GET['domain'])?>&record_id=<?=$data[$key]['ID']?>&token=<?=$_SESSION['token']?>" />
                       <input type="hidden" name="delete_url" value="/delete/dns/?domain=<?=htmlspecialchars($_GET['domain'])?>&record_id=<?=$data[$key]['ID']?>&token=<?=$_SESSION['token']?>" />
                       <div id="delete_dialog_<?=$i?>" class="confirmation-text-delete hidden" title="<?=__('Confirmation')?>">
                       <div id="delete_dialog_<?=$i?>" class="confirmation-text-delete hidden" title="<?=__('Confirmation')?>">
-                        <p class="confirmation"><?=__('DELETE_DOMAIN_CONFIRMATION',$key)?></p>
+                        <p class="confirmation"><?=__('DELETE_RECORD_CONFIRMATION',$key)?></p>
                       </div>
                       </div>
                     </a>
                     </a>
                   </div>
                   </div>