Skip to content

Commit b3a303b

Browse files
committed
Add 1.7.0.sh and rename v-add-sys-phpmailer to v-add-sys-dependencies
1 parent cfe36df commit b3a303b

File tree

6 files changed

+21
-31
lines changed

6 files changed

+21
-31
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
2-
# info: add PHPMailer functionality to Hestia Control Panel
2+
# Add php dependencies to Hestia
33
# options: [MODE]
44
#
5-
# This function installs PHPMailer for server-side email communication.
5+
# This function install PHPMailer and quoteshellarg as via composer
66

77
#----------------------------------------------------------#
88
# Variables & Functions #
@@ -30,7 +30,7 @@ COMPOSER_BIN="$HOMEDIR/$user/.composer/composer"
3030

3131
# Checking root permissions
3232
if [ "x$(id -u)" != 'x0' ]; then
33-
echo "ERROR: v-add-sys-phpmailer can be run executed only by root user"
33+
echo "ERROR: v-add-sys-dependencies can be run executed only by root user"
3434
exit 10
3535
fi
3636

@@ -48,7 +48,7 @@ fi
4848
if [ ! -f "$COMPOSER_BIN" ]; then
4949
$BIN/v-add-user-composer "$user"
5050
if [ $? -ne 0 ]; then
51-
$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>.'
51+
$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>.'
5252
exit 1
5353
fi
5454
fi
@@ -77,11 +77,11 @@ if [ $? -ne 0 ]; then
7777
echo "ERROR: PHPMailer installation failed!"
7878
echo "Please report this to our development team:"
7979
echo "https://github.com/hestiacp/hestiacp/issues"
80-
$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>.'
80+
$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>.'
8181
# Installation failed, clean up files
8282
rm --recursive --force ${PM_INSTALL_DIR}/vendor
8383
$BIN/v-change-sys-config-value 'USE_SERVER_SMTP' 'n'
84-
$BIN/v-log-action "system" "Error" "Plugins" "PHPMailer installation failed (Version: $pm_v)."
84+
$BIN/v-log-action "system" "Error" "Plugins" "PHP dependencies installation failed"
8585
exit 1
8686
fi
8787

func/upgrade.sh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -678,18 +678,9 @@ upgrade_rainloop(){
678678
fi
679679
}
680680

681-
upgrade_phpmailer(){
682-
if [ ! -d "$HESTIA/web/inc/vendor/" ]; then
683-
echo "[ ! ] Install PHPmailer";
684-
$HESTIA/bin/v-add-sys-phpmailer
685-
fi
686-
phpm_version=$(cat $HESTIA/web/inc/vendor/phpmailer/phpmailer/VERSION);
687-
if [ "$phpm_version" != "$pm_v" ]; then
688-
echo "[ ! ] Upgrading PHPmailer to version $pm_v..."
689-
$HESTIA/bin/v-add-sys-phpmailer
690-
else
691-
echo "[ * ] PHPmailer is up to date ($pm_v)..."
692-
fi
681+
upgrade_dependencies(){
682+
echo "[ ! ] Update Hesita PHP dependencies";
683+
$HESTIA/bin/v-add-sys-dependencies
693684
}
694685

695686
upgrade_rebuild_web_templates() {

install/hst-install-debian.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,8 +1866,8 @@ $HESTIA/bin/v-add-sys-filemanager quiet
18661866
# Configure PHPMailer #
18671867
#----------------------------------------------------------#
18681868

1869-
echo "[ * ] Configuring PHPMailer..."
1870-
$HESTIA/bin/v-add-sys-phpmailer quiet
1869+
echo "[ * ] Configuring PHP dependencies..."
1870+
$HESTIA/bin/v-add-sys-dependencies quiet
18711871

18721872
#----------------------------------------------------------#
18731873
# Configure API #

install/hst-install-ubuntu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,8 +1952,8 @@ $HESTIA/bin/v-add-sys-filemanager quiet
19521952
# Configure PHPMailer #
19531953
#----------------------------------------------------------#
19541954

1955-
echo "[ * ] Configuring PHPMailer..."
1956-
$HESTIA/bin/v-add-sys-phpmailer quiet
1955+
echo "[ * ] Configuring PHP dependencies..."
1956+
$HESTIA/bin/v-add-sys-dependencies quiet
19571957

19581958

19591959
#----------------------------------------------------------#
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Hestia Control Panel upgrade script for target version unknow
3+
# Hestia Control Panel upgrade script for target version unreleased
44

55
#######################################################################################
66
####### Place additional commands below. #######
@@ -21,10 +21,9 @@ upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'no'
2121
upgrade_config_set_value 'UPGRADE_REBUILD_USERS' 'no'
2222
upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'false'
2323

24-
# make sure to sync install qouteshellarg
25-
$HESTIA/bin/v-add-sys-phpmailer
26-
if [ "$FILE_MANAGER" = "true" ]; then
27-
# Sync up filemanger
28-
$HESTIA/bin/v-delete-sys-filemanger
29-
$HESTIA/bin/v-add-sys-filemanger
24+
# Make sure to sync install quoteshell arg
25+
$HESTIA/bin/v-add-sys-depencies
26+
if [ "$FILE_MANAGER" = "true" ]; then
27+
$HESTIA/bin/v-delete-sys-filemanager
28+
$HESTIA/bin/v-add-sys-filemanager
3029
fi

src/deb/hestia/postinst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ upgrade_rainloop | tee -a $LOG
8383
# Upgrade Roundcube if applicable
8484
upgrade_roundcube | tee -a $LOG
8585

86-
# Upgrade PHPMailer if applicable
87-
upgrade_phpmailer | tee -a $LOG
86+
# Upgrade PHP php dependencies
87+
upgrade_dependencies | tee -a $LOG
8888

8989
# Upgrade phpMyAdmin if applicable
9090
upgrade_phpmyadmin | tee -a $LOG

0 commit comments

Comments
 (0)