Skip to content

Commit 8f23d7e

Browse files
authored
Merge branch 'main' into staging/features
2 parents f26f6d3 + 96edcb5 commit 8f23d7e

21 files changed

+193
-37
lines changed

CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ All notable changes to this project will be documented in this file.
99
- `UPGRADE_SEND_EMAIL` = Sends an email notification to admin email address
1010
- `UPGRADE_SEND_EMAIL_LOG` = Sends installation log output to admin email address
1111
- Upgrade process will now save logs to the `hst_backups` directory.
12-
- Support for removing backup remote location (#1083)
12+
- Support for removing backup remote location (#1083).
1313
- Add support Proftpd TLS Support
14-
- Add the possibility to assign user "Administrators" rights on login. Replaces "root" login. Notifications are only send towards the "admin" account email
15-
- Updated translations system with the use of Gettext. Modified / Updated all translated strings
16-
- Updated MariaDB to 10.5 (Manual upgrade required install/upgrade/manual/upgrade_mariadb.sh)
14+
- Add the possibility to assign user "Administrators" rights on login. Replaces "root" login. Notifications are only send towards the "admin" account email.
15+
- Updated translations system with the use of Gettext. Modified / Updated all translated strings.
16+
- Use php7.4 as default version.
17+
- Updated MariaDB to 10.5 (Manual upgrade required install/upgrade/manual/upgrade_mariadb.sh).
1718

1819
## Bugfixes
1920
- Removed root login (root / root password )

bin/v-add-backup-host

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
type=$1
1414
host=$2
1515
user=$3
16-
password=$4; HIDE=4
16+
raw_password=$4; HIDE=4
17+
password=$(perl -e 'print quotemeta shift(@ARGV)' "${raw_password}")
1718
path=${5-/backup}
1819
port=$6
1920

bin/v-add-sys-filemanager

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ if [ ! -f "$COMPOSER_BIN" ]; then
5252
fi
5353
fi
5454

55-
# Ensure PHP 7.3 is installed before continuing
56-
if [ ! -f "/usr/bin/php7.3" ]; then
57-
$BIN/v-add-user-notification admin 'File Manager installation failed!' '<b>Unable to proceed with installation of File Manager.</b><br><br>Package <b>php7.3-cli</b> is missing from your system. Please check your PHP installation and environment settings.'
58-
echo "ERROR: PHP 7.3 not installed on your system, aborting."
59-
exit 1
60-
fi
61-
6255
# Perform verification if read-only mode is enabled
6356
check_hestia_demo_mode
6457

@@ -81,7 +74,7 @@ cp --recursive --force ${HESTIA_INSTALL_DIR}/filemanager/filegator/* "${FM_INSTA
8174

8275
chown $user: -R "${FM_INSTALL_DIR}"
8376

84-
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php7.3 $COMPOSER_BIN --quiet --no-dev install
77+
COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php $COMPOSER_BIN --quiet --no-dev install
8578

8679
# Check if installation was successful, if not abort script and throw error message notification and clean-up
8780
if [ $? -ne 0 ]; then

bin/v-add-web-domain-backend

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,13 @@ cat $WEBTPL/$WEB_BACKEND/$template.tpl |\
6666
-e "s|%backend%|$backend_type|g"\
6767
-e "s|%backend_version%|$backend_version|g" > $pool/$backend_type.conf
6868

69+
6970
# Set correct document root path
7071
if [ ! -z "$CUSTOM_DOCROOT" ]; then
7172
docroot="$CUSTOM_DOCROOT"
73+
if [ ! -z "$CUSTOM_PHPROOT" ]; then
74+
docroot="$CUSTOM_PHPROOT"
75+
fi
7276
sed -i "s|/home\/$user\/web\/$domain\/public_html|$docroot|g" $pool/$backend_type.conf
7377
else
7478
docroot="$HOMEDIR/$user/web/$domain/public_html/"

bin/v-change-web-domain-docroot

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# info: Changes the document root for an existing web domain
33

4-
# options: USER DOMAIN TARGET_DOMAIN [DIRECTORY]
4+
# options: USER DOMAIN TARGET_DOMAIN [DIRECTORY] [PHP]
55
# example usage:
66
# add custom docroot: v-change-web-domain-docroot admin domain.tld otherdomain.tld
77
# points domain.tld to otherdomain.tld's document root.
@@ -25,6 +25,7 @@ domain=$2
2525
# so they are correctly passed through to domain.sh
2626
export target_domain=$3
2727
export target_directory=$4
28+
export php=$5
2829

2930
# Includes
3031
source $HESTIA/func/main.sh
@@ -66,13 +67,15 @@ check_hestia_demo_mode
6667
# Unset existing custom document root path
6768
if [ ! -z "$CUSTOM_DOCROOT" ]; then
6869
update_object_value 'web' 'DOMAIN' "$domain" '$CUSTOM_DOCROOT' ""
70+
update_object_value 'web' 'DOMAIN' "$domain" '$CUSTOM_PHPROOT' ""
6971
fi
7072

7173
# If target domain value is 'default', remove the custom document root
7274
# value and rebuild web domain to restore default configuration.
7375
# Otherwise, set target document root path accordingly based on passed values.
7476
if [ "$target_domain" = "default" ]; then
7577
update_object_value 'web' 'DOMAIN' "$domain" '$CUSTOM_DOCROOT' ""
78+
update_object_value 'web' 'DOMAIN' "$domain" '$CUSTOM_PHPROOT' ""
7679
else
7780
# Check for existence of specified directory under target domain's public_html folder
7881
if [ ! -z "$target_directory" ]; then
@@ -81,12 +84,24 @@ else
8184
exit 1
8285
else
8386
CUSTOM_DOCROOT="$HOMEDIR/$user/web/$target_domain/public_html/$target_directory/"
87+
if [ ! -z "$php" ]; then
88+
custom_phproot="$HOMEDIR/$user/web/$target_domain/public_html/"
89+
else
90+
custom_phproot="$HOMEDIR/$user/web/$target_domain/public_html/$target_directory/"
91+
fi
8492
fi
8593
else
8694
CUSTOM_DOCROOT="$HOMEDIR/$user/web/$target_domain/public_html/"
95+
custom_phproot="$HOMEDIR/$user/web/$target_domain/public_html/"
8796
fi
97+
8898
add_object_key 'web' 'DOMAIN' "$domain" 'CUSTOM_DOCROOT' 'IP6'
99+
add_object_key 'web' 'DOMAIN' "$domain" 'CUSTOM_PHPROOT' 'IP6'
100+
89101
update_object_value 'web' 'DOMAIN' "$domain" '$CUSTOM_DOCROOT' "$CUSTOM_DOCROOT"
102+
# CUSTOM_PHPROOT got overwriten by default
103+
CUSTOM_PHPROOT=$custom_phproot
104+
update_object_value 'web' 'DOMAIN' "$domain" '$CUSTOM_PHPROOT' "$CUSTOM_PHPROOT"
90105
fi
91106

92107
#----------------------------------------------------------#

bin/v-list-sys-config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ json_list() {
5353
"LANGUAGE": "'$LANGUAGE'",
5454
"BACKUP_GZIP": "'$BACKUP_GZIP'",
5555
"BACKUP": "'$BACKUP'",
56+
"BACKUP_MODE": "'$BACKUP_MODE'",
5657
"WEBMAIL_ALIAS": "'$WEBMAIL_ALIAS'",
5758
"DB_PMA_ALIAS": "'$DB_PMA_ALIAS'",
5859
"DB_PGA_ALIAS": "'$DB_PGA_ALIAS'",
60+
"LOGIN_STYLE": "'$LOGIN_STYLE'",
5961
"SOFTACULOUS": "'$SOFTACULOUS'"
6062
}
6163
}'

bin/v-restore-user

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then
591591
format_domain_idn
592592

593593
# Restoring emails
594-
if [ $BACKUP_MODE = 'zstd' ]; then
594+
if [ $backup_mode = 'zstd' ]; then
595595
if [ -e "$tmpdir/mail/$domain/accounts.tar.zst" ]; then
596596
chmod u+w "$HOMEDIR/$user/mail/$domain_idn"
597597
$BIN/v-extract-fs-archive "$user" "$tmpdir/mail/$domain/accounts.tar.zst" "$HOMEDIR/$user/mail/$domain_idn/"
@@ -696,7 +696,7 @@ if [ "$db" != 'no' ] && [ ! -z "$DB_SYSTEM" ]; then
696696
fi
697697

698698
# Unzipping database dump
699-
if [ $BACKUP_MODE = 'zstd' ]; then
699+
if [ $backup_mode = 'zstd' ]; then
700700
zstd -d $tmpdir/db/$database/$database.*.sql.zst
701701
else
702702
gzip -d $tmpdir/db/$database/$database.*.sql.gz
@@ -759,7 +759,7 @@ if [ "$udir" != 'no' ]; then
759759

760760
# Creating user dir restore list
761761
backup_dirs=$(tar -tf $BACKUP/$backup |grep "^./user_dir")
762-
if [ $BACKUP_MODE = 'zstd' ]; then
762+
if [ $backup_mode = 'zstd' ]; then
763763
backup_dirs=$(echo "$backup_dirs" |grep tar.zst)
764764
backup_dirs=$(echo "$backup_dirs" |cut -f 3 -d /)
765765
backup_dirs=$(echo "$backup_dirs" |sed "s/.tar.zst//")
@@ -777,7 +777,7 @@ if [ "$udir" != 'no' ]; then
777777

778778
for user_dir in $user_dirs; do
779779
echo -e "$(date "+%F %T") $user_dir" |tee -a $tmpdir/restore.log
780-
if [ $BACKUP_MODE = 'zstd' ]; then
780+
if [ $backup_mode = 'zstd' ]; then
781781
tar xf "$BACKUP/$backup" -C "$tmpdir" --no-wildcards "./user_dir/$user_dir.tar.zst"
782782
else
783783
tar xf "$BACKUP/$backup" -C "$tmpdir" --no-wildcards "./user_dir/$user_dir.tar.gz"
@@ -793,7 +793,7 @@ if [ "$udir" != 'no' ]; then
793793
chown "$user" "$tmpdir/user_dir"
794794
chown "$user" "$HOMEDIR/$user"
795795
[ -e "$HOMEDIR/$user/$user_dir" ] && chown "$user" "$HOMEDIR/$user/$user_dir"
796-
if [ $BACKUP_MODE = 'zstd' ]; then
796+
if [ $backup_mode = 'zstd' ]; then
797797
$BIN/v-extract-fs-archive "$user" "$tmpdir/user_dir/$user_dir.tar.zst" "$HOMEDIR/$user"
798798
else
799799
$BIN/v-extract-fs-archive "$user" "$tmpdir/user_dir/$user_dir.tar.gz" "$HOMEDIR/$user"

install/hst-install-debian.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ VERBOSE='no'
2626
HESTIA_INSTALL_VER='1.3.0~beta'
2727
pma_v='5.0.2'
2828
multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4")
29-
fpm_v="7.3"
29+
fpm_v="7.4"
3030
mariadb_v="10.5"
3131

3232
if [ "$release" -eq 9 ]; then
@@ -1080,6 +1080,9 @@ echo "BACKUP_MODE='zstd'" >> $HESTIA/conf/hestia.conf
10801080
# Language
10811081
echo "LANGUAGE='$lang'" >> $HESTIA/conf/hestia.conf
10821082

1083+
# Login in screen
1084+
echo "LOGIN_STYLE='default" >> $HESTIA/conf/hestia.conf
1085+
10831086
# Version & Release Branch
10841087
echo "VERSION='${HESTIA_INSTALL_VER}'" >> $HESTIA/conf/hestia.conf
10851088
echo "RELEASE_BRANCH='release'" >> $HESTIA/conf/hestia.conf

install/hst-install-ubuntu.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ VERBOSE='no'
2626
HESTIA_INSTALL_VER='1.3.0~beta'
2727
pma_v='5.0.2'
2828
multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4")
29-
fpm_v="7.3"
29+
fpm_v="7.4"
3030
mariadb_v="10.5"
3131

3232
# Defining software pack for all distros
@@ -1118,6 +1118,9 @@ echo "BACKUP_MODE='zstd'" >> $HESTIA/conf/hestia.conf
11181118
# Language
11191119
echo "LANGUAGE='$lang'" >> $HESTIA/conf/hestia.conf
11201120

1121+
# Login in screen
1122+
echo "LOGIN_STYLE='default" >> $HESTIA/conf/hestia.conf
1123+
11211124
# Version & Release Branch
11221125
echo "VERSION='${HESTIA_INSTALL_VER}'" >> $HESTIA/conf/hestia.conf
11231126
echo "RELEASE_BRANCH='release'" >> $HESTIA/conf/hestia.conf

install/upgrade/versions/1.3.0.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,8 @@ fi
5656

5757
# Change backup mode to zstd.
5858
echo "[ * ] Enable new backup compression zstd as default."
59-
$BIN/v-change-sys-config-value "BACKUP_MODE" "zstd"
59+
$BIN/v-change-sys-config-value "BACKUP_MODE" "zstd"
60+
61+
# Set var LOGIN_STYLE hestia.conf
62+
echo "[ * ] Set var LOGIN_STYLE hestia.conf"
63+
$BIN/v-change-sys-config-value "LOGIN_STYLE" "default"

0 commit comments

Comments
 (0)