Skip to content

Commit 83eb1b9

Browse files
authored
Fix/update bugs (hestiacp#2354)
* Fixed bug in 1.5.5 upgrade script cp: cannot create regular file '/etc/php//etc/php/5.6/fpm/php-fpm.conf/fpm/': No such file or directory 13s 52 sed: -e expression hestiacp#1, char 11: unknown option to `s' * Add check if /vendor/autoload exists * return exit code 1 when not working
1 parent 1b766ad commit 83eb1b9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

install/upgrade/versions/1.5.5.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ upgrade_config_set_value 'UPGRADE_REBUILD_USERS' 'true'
2222
upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'false'
2323

2424
# Update php-fpm.conf
25-
for version in /etc/php/*/fpm/php-fpm.conf; do
25+
for version in $($BIN/v-list-sys-php plain); do
2626
cp -f $HESTIA_INSTALL_DIR/php-fpm/php-fpm.conf /etc/php/$version/fpm/
2727
sed -i "s/fpm_v/$version/g" /etc/php/$version/fpm/php-fpm.conf
2828
done

web/inc/main.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44
use PHPMailer\PHPMailer\SMTP;
55
use PHPMailer\PHPMailer\Exception;
66

7-
require 'vendor/autoload.php';
7+
if(!file_exists('vendor/autoload.php')){
8+
trigger_error('Unable able to load required libaries. Please run v-add-sys-phpmailer in command line');
9+
echo 'Unable able to load required libaries. Please run v-add-sys-phpmailer in command line';
10+
exit(1);
11+
}
812

13+
require 'vendor/autoload.php';
914
session_start();
1015

1116

0 commit comments

Comments
 (0)