Răsfoiți Sursa

Add 1.7.0.sh and rename v-add-sys-phpmailer to v-add-sys-dependencies

Jaap Marcus 3 ani în urmă
părinte
comite
b3a303b18d

+ 6 - 6
bin/v-add-sys-phpmailer → bin/v-add-sys-dependencies

@@ -1,8 +1,8 @@
 #!/bin/bash
-# info: add PHPMailer functionality to Hestia Control Panel
+# Add php dependencies to Hestia 
 # options: [MODE]
 #
-# This function installs PHPMailer for server-side email communication.
+# This function install PHPMailer and quoteshellarg as via composer
 
 #----------------------------------------------------------#
 #                Variables & Functions                     #
@@ -30,7 +30,7 @@ COMPOSER_BIN="$HOMEDIR/$user/.composer/composer"
 
 # Checking root permissions
 if [ "x$(id -u)" != 'x0' ]; then
-    echo "ERROR: v-add-sys-phpmailer can be run executed only by root user"
+    echo "ERROR: v-add-sys-dependencies can be run executed only by root user"
     exit 10
 fi
 
@@ -48,7 +48,7 @@ fi
 if [ ! -f "$COMPOSER_BIN" ]; then
     $BIN/v-add-user-composer "$user"
     if [ $? -ne 0 ]; then
-        $BIN/v-add-user-notification admin 'Composer installation failed!' '<b>PHPMailer will not work without Composer.</b><br><br>Please try running the installer manually from a shell session:<br>v-add-sys-phpmailer<br><br>If this continues, open an issue report on <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a>.'
+        $BIN/v-add-user-notification admin 'Composer installation failed!' '<b>Hestia will not work without Composer.</b><br><br>Please try running the installer manually from a shell session:<br>v-add-sys-phpmailer<br><br>If this continues, open an issue report on <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a>.'
         exit 1
     fi
 fi
@@ -77,11 +77,11 @@ if [ $? -ne 0 ]; then
     echo "ERROR: PHPMailer installation failed!"
     echo "Please report this to our development team:"
     echo "https://github.com/hestiacp/hestiacp/issues"
-    $BIN/v-add-user-notification admin 'PHPMailer installation failed!' 'Please report this to our development team on <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a>.'
+    $BIN/v-add-user-notification admin 'Hestia PHP dependencies installation failed!' 'Please report this to our development team on <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a>.'
     # Installation failed, clean up files
     rm --recursive --force ${PM_INSTALL_DIR}/vendor
     $BIN/v-change-sys-config-value 'USE_SERVER_SMTP' 'n'
-    $BIN/v-log-action "system" "Error" "Plugins" "PHPMailer installation failed (Version: $pm_v)."
+    $BIN/v-log-action "system" "Error" "Plugins" "PHP dependencies installation failed"
     exit 1
 fi
 

+ 3 - 12
func/upgrade.sh

@@ -678,18 +678,9 @@ upgrade_rainloop(){
     fi
 }
 
-upgrade_phpmailer(){
-    if [ ! -d "$HESTIA/web/inc/vendor/" ]; then
-        echo "[ ! ] Install PHPmailer";
-        $HESTIA/bin/v-add-sys-phpmailer
-    fi
-    phpm_version=$(cat $HESTIA/web/inc/vendor/phpmailer/phpmailer/VERSION);
-    if [ "$phpm_version" != "$pm_v" ]; then
-    echo "[ ! ] Upgrading PHPmailer to version $pm_v..."
-        $HESTIA/bin/v-add-sys-phpmailer
-    else
-        echo "[ * ] PHPmailer is up to date ($pm_v)..."
-    fi 
+upgrade_dependencies(){
+    echo "[ ! ] Update Hesita PHP dependencies";
+    $HESTIA/bin/v-add-sys-dependencies
 }
 
 upgrade_rebuild_web_templates() {

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

@@ -1866,8 +1866,8 @@ $HESTIA/bin/v-add-sys-filemanager quiet
 #                  Configure PHPMailer                     #
 #----------------------------------------------------------#
 
-echo "[ * ] Configuring PHPMailer..."
-$HESTIA/bin/v-add-sys-phpmailer quiet
+echo "[ * ] Configuring PHP dependencies..."
+$HESTIA/bin/v-add-sys-dependencies quiet
 
 #----------------------------------------------------------#
 #                       Configure API                      #

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

@@ -1952,8 +1952,8 @@ $HESTIA/bin/v-add-sys-filemanager quiet
 #                  Configure PHPMailer                     #
 #----------------------------------------------------------#
 
-echo "[ * ] Configuring PHPMailer..."
-$HESTIA/bin/v-add-sys-phpmailer quiet
+echo "[ * ] Configuring PHP dependencies..."
+$HESTIA/bin/v-add-sys-dependencies quiet
 
 
 #----------------------------------------------------------#

+ 6 - 7
install/upgrade/versions/unreleased.sh → install/upgrade/versions/1.7.0.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Hestia Control Panel upgrade script for target version unknow
+# Hestia Control Panel upgrade script for target version unreleased
 
 #######################################################################################
 #######                      Place additional commands below.                   #######
@@ -21,10 +21,9 @@ upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'no'
 upgrade_config_set_value 'UPGRADE_REBUILD_USERS' 'no'
 upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'false'
 
-# make sure to sync install qouteshellarg
-$HESTIA/bin/v-add-sys-phpmailer
-if [ "$FILE_MANAGER" = "true" ]; then
-    # Sync up filemanger
-    $HESTIA/bin/v-delete-sys-filemanger
-    $HESTIA/bin/v-add-sys-filemanger        
+# Make sure to sync install quoteshell arg
+$HESTIA/bin/v-add-sys-depencies 
+if [ "$FILE_MANAGER" = "true" ]; then 
+    $HESTIA/bin/v-delete-sys-filemanager
+    $HESTIA/bin/v-add-sys-filemanager      
 fi

+ 2 - 2
src/deb/hestia/postinst

@@ -83,8 +83,8 @@ upgrade_rainloop | tee -a $LOG
 # Upgrade Roundcube if applicable
 upgrade_roundcube | tee -a $LOG
 
-# Upgrade PHPMailer if applicable
-upgrade_phpmailer | tee -a $LOG
+# Upgrade PHP php dependencies
+upgrade_dependencies | tee -a $LOG
 
 # Upgrade phpMyAdmin if applicable
 upgrade_phpmyadmin | tee -a $LOG