Skip to content

Commit de2a825

Browse files
Improve update text (hestiacp#2270)
* Do not restart phpfpm when modphp is installed * Synchronise upgrade messages * Replace sed with slightly narrow sed Issue caused with Vultr not working under Deb11 * Apply fix also to v-change-firewall-rule See hestiacp#2249 for reason why * Remove space at the end. Co-authored-by: Raphael Schneeberger <rs@scit.ch>
1 parent d63c4a8 commit de2a825

File tree

4 files changed

+22
-19
lines changed

4 files changed

+22
-19
lines changed

bin/v-change-firewall-rule

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ is_object_valid '../../data/firewall/rules' 'RULE' "$rule"
5353

5454
if [[ "$ip" =~ ^ipset: ]]; then
5555
ipset_name="${ip#ipset:}"
56-
v-list-firewall-ipset plain | grep "^$ipset_name\s" >/dev/null
56+
$BIN/v-list-firewall-ipset plain | grep "^$ipset_name\s" >/dev/null
5757
check_result $? 'ipset object not found' "$E_NOTEXIST"
5858
else
5959
is_format_valid 'ip'

bin/v-delete-sys-filemanager

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#----------------------------------------------------------#
1313

1414
MODE=$1
15+
FORCE=$2
1516

1617
# Includes
1718
# shellcheck source=/etc/hestiacp/hestia.conf
@@ -47,12 +48,12 @@ fi
4748
check_hestia_demo_mode
4849

4950
# Check if File Manager components are installed
50-
if [ "$MODE" != "force" ] && [ ! -e "$FM_INSTALL_DIR" ]; then
51+
if [ "$FORCE" != "yes" ] && [ ! -e "$FM_INSTALL_DIR" ]; then
5152
echo "ERROR: File Manager components are not installed."
5253
exit 1
5354
fi
5455

55-
if [ "$MODE" != "force" ] && [ "$FILE_MANGER" = "false" ]; then
56+
if [ "$FORCE" != "yes" ] && [ "$FILE_MANGER" = "false" ]; then
5657
echo "ERROR: File Manager is not enabled."
5758
exit 1
5859
fi

func/upgrade.sh

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ upgrade_phpmyadmin() {
548548

549549
pma_release_file=$(ls /usr/share/phpmyadmin/RELEASE-DATE-* 2>/dev/null |tail -n 1)
550550
if version_ge "${pma_release_file##*-}" "$pma_v"; then
551-
echo "[ ! ] Verifying phpMyAdmin v${pma_release_file##*-} installation..., No update found"
551+
echo "[ * ] Verify phpMyAdmin v${pma_release_file##*-} installation, No update found"
552552
# Update permissions
553553
if [ -e /var/lib/phpmyadmin/blowfish_secret.inc.php ]; then
554554
chown root:www-data /var/lib/phpmyadmin/blowfish_secret.inc.php
@@ -604,16 +604,16 @@ upgrade_filemanager() {
604604
fm_verison="1.0.0"
605605
fi
606606
if [ "$fm_verison" != "$fm_v" ]; then
607-
echo "[ * ] Updating File Manager..."
607+
echo "[ ! ] Updating File Manager..."
608608
# Reinstall the File Manager
609-
$HESTIA/bin/v-delete-sys-filemanager quiet
609+
$HESTIA/bin/v-delete-sys-filemanager quiet yes
610610
$HESTIA/bin/v-add-sys-filemanager quiet
611611
else
612612
echo "[ * ] Verify version Filemanager, No update found"
613613

614614
if [ "$UPGRADE_UPDATE_FILEMANAGER_CONFIG" = "true" ]; then
615615
if [ -e "$HESTIA/web/fm/configuration.php" ]; then
616-
echo "[ * ] Updating File Manager configuration..."
616+
echo "[ ! ] Updating File Manager configuration..."
617617
# Update configuration.php
618618
cp -f $HESTIA_INSTALL_DIR/filemanager/filegator/configuration.php $HESTIA/web/fm/configuration.php
619619
# Set environment variable for interface
@@ -627,11 +627,11 @@ upgrade_filemanager() {
627627
upgrade_roundcube(){
628628
if [ -n "$(echo "$WEBMAIL_SYSTEM" | grep -w 'roundcube')" ]; then
629629
if [ -d "/usr/share/roundcube" ]; then
630-
echo "[ ! ] Roundcube: Unable to update. Updates are managed by apt.";
630+
echo "[ * ] Roundcube: Unable to update. Updates are managed by apt.";
631631
else
632632
rc_version=$(cat /var/lib/roundcube/index.php | grep -o -E '[0-9].[0-9].[0-9]+' | head -1);
633633
if [ "$rc_version" != "$rc_v" ]; then
634-
echo "[ * ] Upgrading Roundcube to version v$rc_v..."
634+
echo "[ ! ] Upgrading Roundcube to version v$rc_v..."
635635
$HESTIA/bin/v-add-sys-roundcube
636636
else
637637
echo "[ * ] Verify version Roundcube, No update found"
@@ -644,7 +644,7 @@ upgrade_rainloop(){
644644
if [ -n "$(echo "$WEBMAIL_SYSTEM" | grep -w 'rainloop')" ]; then
645645
rl_version=$(cat /var/lib/rainloop/data/VERSION);
646646
if [ "$rl_version" != "$rl_v" ]; then
647-
echo "[ * ] Upgrading Rainloop to version v$rl_v..."
647+
echo "[ ! ] Upgrading Rainloop to version v$rl_v..."
648648
$HESTIA/bin/v-add-sys-rainloop
649649
else
650650
echo "[ * ] Verify version Rainloop, No update found"
@@ -659,7 +659,7 @@ upgrade_phpmailer(){
659659
fi
660660
phpm_version=$(cat $HESTIA/web/inc/vendor/phpmailer/phpmailer/VERSION);
661661
if [ "$phpm_version" != "$pm_v" ]; then
662-
echo "[ * ] Upgrade phpmailer"
662+
echo "[ ! ] Upgrade phpmailer"
663663
$HESTIA/bin/v-add-sys-phpmailer
664664
else
665665
echo "[ * ] Verify Version phpmailer No update found"
@@ -779,13 +779,15 @@ upgrade_restart_services() {
779779
fi
780780
$BIN/v-restart-dns 'yes'
781781
fi
782-
versions_list=$($BIN/v-list-sys-php plain)
783-
for v in $versions_list; do
784-
if [ "$DEBUG_MODE" = "true" ]; then
785-
echo " - php$v-fpm"
786-
fi
787-
$BIN/v-restart-service "php$v-fpm" 'yes'
788-
done
782+
if [ -n "$WEB_BACKEND" ]; then
783+
versions_list=$($BIN/v-list-sys-php plain)
784+
for v in $versions_list; do
785+
if [ "$DEBUG_MODE" = "true" ]; then
786+
echo " - php$v-fpm"
787+
fi
788+
$BIN/v-restart-service "php$v-fpm" 'yes'
789+
done
790+
fi
789791
if [ -n "$FTP_SYSTEM" ]; then
790792
if [ "$DEBUG_MODE" = "true" ]; then
791793
echo " - $FTP_SYSTEM"

install/hst-install-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ check_result $? "can't enable sftp jail"
12741274
# Switch to sha512 for deb11.
12751275
if [ "$release" -eq 11 ]; then
12761276
# Switching to sha512
1277-
sed -i "s/obscure yescrypt/obscure sha512/g" /etc/pam.d/common-password
1277+
sed -i "s/ yescrypt/ sha512/g" /etc/pam.d/common-password
12781278
fi
12791279

12801280
# Adding Hestia admin account

0 commit comments

Comments
 (0)