Skip to content

Commit 59c9f1e

Browse files
authored
Update Composer dependencies (hestiacp#3343)
* Update Composer dependencies -phpmyadmin to 6.8.0 * Add check for restart flag * Use v-update-sys-dependencies instead * Update 2fa authentication plugin * Use composer to update things * Use main composer file * Replace hardcode path wiht $HESTIA_PHP * Update changelog
1 parent 20d8b57 commit 59c9f1e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+265
-2350
lines changed

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
# Composer
2929
composer.phar
3030
test/vendor/
31-
web/src/vendor/filp
32-
web/src/vendor/psr
33-
web/src/vendor/composer/installed.json
31+
# PHPMailer
32+
web/inc/vendor/
33+
# Quick install
34+
web/src/vendor/
3435
.phpunit.result.cache
3536

3637
# vitepress build output

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ All notable changes to this project will be documented in this file.
2323
- Added alias for composer (#3070)
2424
- Updated PhpPgAdmin and with support for PostgreSQL 15 (<https://github.com/hestiacp/phppgadmin>)
2525
- Upgrade MariaDB to 10.11 (#3305)
26+
- Add Quick installer for Flarum (#3342 and #3298 @Steveorevo)
27+
- Enable UTF8MB4 on default for Mysql (#3337 #1882)
28+
- Update Cloudflare ip adresses on each update (#3338 #2575)
2629

2730
### Bugfixes
2831

@@ -60,6 +63,7 @@ All notable changes to this project will be documented in this file.
6063
- Fixed an issue with erroneous deleting $domain.\* instead of $domain.pem (#3221)
6164
- Fixed an issue with domain redirect and idn2 domains (#3323 #3325)
6265
- Fixed an issue in Dokuwiki due to changing repository owner (#3327)
66+
- Fixed an issue with B2 and changing access keys
6367

6468
### Dependencies
6569

@@ -71,6 +75,7 @@ All notable changes to this project will be documented in this file.
7175
- Updated phpPgAdmin to 7.3.14-hestiacp
7276
- Update MediaWiki to 1.39.2
7377
- Update Prestashop to 8.0.1
78+
- Update TwoFactorAuth to 2.0.0
7479

7580
## [1.6.14] - Service release
7681

bin/v-add-sys-dependencies

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ MODE=$1
2222
user="admin"
2323

2424
PM_INSTALL_DIR="$HESTIA/web/inc"
25+
QUICK_INSTALL_DIR="$HESTIA/web/src"
2526
COMPOSER_BIN="$HOMEDIR/$user/.composer/composer"
2627

2728
#----------------------------------------------------------#
@@ -69,7 +70,7 @@ openssl_installed=$(/usr/local/hestia/php/bin/php -m | grep openssl)
6970
if [ -z "$openssl_installed" ]; then
7071
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php $COMPOSER_BIN --quiet --no-dev install
7172
else
72-
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/local/hestia/php/bin/php $COMPOSER_BIN --quiet --no-dev install
73+
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec $HESTIA_PHP $COMPOSER_BIN --quiet --no-dev install
7374
fi
7475

7576
# Check if installation was successful, if not abort script and throw error message notification and clean-up
@@ -85,8 +86,20 @@ if [ $? -ne 0 ]; then
8586
exit 1
8687
fi
8788

89+
cd "$QUICK_INSTALL_DIR"
90+
rm --recursive --force ${QUICK_INSTALL_DIR}/vendor
91+
mkdir -p ${QUICK_INSTALL_DIR}/vendor
92+
chown $user: -R ${QUICK_INSTALL_DIR}/vendor
93+
94+
if [ -z "$openssl_installed" ]; then
95+
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php $COMPOSER_BIN --quiet --no-dev install
96+
else
97+
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec $HESTIA_PHP $COMPOSER_BIN --quiet --no-dev install
98+
fi
99+
88100
# Set permissions
89101
chown root: -R "${PM_INSTALL_DIR}/vendor"
102+
chown root: -R "${QUICK_INSTALL_DIR}/vendor"
90103

91104
#----------------------------------------------------------#
92105
# Logging #

bin/v-add-user-2fa

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if [ -n "$TWOFA" ]; then
4646
fi
4747

4848
# Get secret and qr code from 2fa libary
49-
data=$($HESTIA/php/bin/php $HESTIA/web/inc/2fa/secret.php)
49+
data=$($HESTIA_PHP $HESTIA/web/inc/2fa/secret.php)
5050

5151
# Split to secret and qrcode using delimiter
5252
IFS='-' read -r -a array <<< "$data"

bin/v-check-user-2fa

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ if [ -z "$TWOFA" ]; then
4444
fi
4545

4646
# Check if token is valid
47-
result=$($HESTIA/php/bin/php $HESTIA/web/inc/2fa/check.php "$TWOFA" "$token")
47+
result=$($HESIA_PHP $HESTIA/web/inc/2fa/check.php "$TWOFA" "$token")
4848
if [ "$result" != "ok" ]; then
4949
echo "Error: Authentication token mismatch."
5050
exit 9

bin/v-rebuild-dns-domain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ source_conf "$HESTIA/conf/hestia.conf"
3535
#----------------------------------------------------------#
3636

3737
check_args '2' "$#" 'USER DOMAIN [RESTART] [UPDATE_SERIAL]'
38-
is_format_valid 'user' 'domain'
38+
is_format_valid 'user' 'domain' 'restart'
3939
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
4040
is_object_valid 'user' 'USER' "$user"
4141
check_user=$(is_object_unsuspended 'user' 'USER' "$user")

bin/v-rebuild-dns-domains

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ source_conf "$HESTIA/conf/hestia.conf"
3434
#----------------------------------------------------------#
3535

3636
check_args '1' "$#" 'USER [RESTART] [UPDATE_SERIAL]'
37-
is_format_valid 'user'
37+
is_format_valid 'user' 'restart'
3838
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
3939
is_object_valid 'user' 'USER' "$user"
4040
check_user=$(is_object_unsuspended 'user' 'USER' "$user")

bin/v-rebuild-mail-domain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fi
4343
#----------------------------------------------------------#
4444

4545
check_args '2' "$#" 'USER DOMAIN'
46-
is_format_valid 'user' 'domain'
46+
is_format_valid 'user' 'domain' 'restart'
4747
is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM'
4848
is_object_valid 'user' 'USER' "$user"
4949
check_user=$(is_object_unsuspended 'user' 'USER' "$user")

bin/v-rebuild-user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ source_conf "$HESTIA/conf/hestia.conf"
3535
#----------------------------------------------------------#
3636

3737
check_args '1' "$#" 'USER [RESTART]'
38-
is_format_valid 'user'
38+
is_format_valid 'user' 'restart'
3939
is_object_valid 'user' 'USER' "$user"
4040
check_user=$(is_object_unsuspended 'user' 'USER' "$user")
4141
if [ -n "$check_user" ]; then

bin/v-rebuild-web-domain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ source_conf "$HESTIA/conf/hestia.conf"
3636
#----------------------------------------------------------#
3737

3838
check_args '2' "$#" 'USER DOMAIN [RESTART]'
39-
is_format_valid 'user' 'domain'
39+
is_format_valid 'user' 'domain' 'restart'
4040
is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
4141
is_object_valid 'user' 'USER' "$user"
4242
check_user=$(is_object_unsuspended 'user' 'USER' "$user")

0 commit comments

Comments
 (0)