Skip to content

Commit d2d5153

Browse files
authored
Merge pull request hestiacp#2134 from hestiacp/staging/1.4.14
Release v1.4.14
2 parents f4d8b2b + a8b3e3d commit d2d5153

File tree

13 files changed

+171
-54
lines changed

13 files changed

+171
-54
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [1.4.14] - Service release
5+
6+
### Bugfixes
7+
8+
- Fixed an issue with edit package
9+
- Fixed an issue with v-update-letsencrypt and v-restart-service
10+
- Fixed an issue with v-add-sys-ip and Ubuntu with no netplan enabled
11+
- Fixed broken UPGRADE_MESSAGE variable not showing up in email
12+
- Include / expand the config backup system during update
13+
414
## [1.4.13] - Service release
515

616
### Features

bin/v-add-sys-ip

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,20 @@ if [ -z "$sys_ip_check" ]; then
7676
# Adding sys ip
7777
/sbin/ip addr add $ip/$cidr dev $iface \
7878
broadcast $broadcast label $iface
79-
80-
if dpkg-query -W -f'${Status}' "netplan*" 2>/dev/null | grep -q "ok installed"; then
79+
80+
# Improve check netplan
81+
if dpkg-query -W -f'${Status}' "netplan*" 2>/dev/null | grep -q "ok installed"; then
82+
result=$(cat /etc/netplan/*.yaml 2>/dev/null | grep $(hostname -I | cut -d' ' -f1));
83+
if [ ! -z $result ]; then
84+
netplan=1
85+
else
86+
netplan=0
87+
fi
88+
else
89+
netplan=0
90+
fi
91+
92+
if [ "$netplan" == "1" ]; then
8193
if [ -f "/etc/netplan/60-hestia.yaml" ]; then
8294
sys_ip=" - $ip/$cidr"
8395
else

func/main.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ is_format_valid() {
11261126
proxy_ext) is_extention_format_valid "$arg" ;;
11271127
quota) is_int_format_valid "$arg" 'quota' ;;
11281128
record) is_common_format_valid "$arg" 'record';;
1129-
restart) is_boolean_format_valid "$arg" 'restart' ;;
1129+
restart) is_restart_format_valid "$arg" 'restart' ;;
11301130
role) is_role_valid "$arg" 'role' ;;
11311131
rtype) is_dns_type_format_valid "$arg" ;;
11321132
rule) is_int_format_valid "$arg" "rule id" ;;
@@ -1188,6 +1188,11 @@ format_aliases() {
11881188
fi
11891189
}
11901190

1191+
is_restart_format_valid() {
1192+
if [ "$1" != 'yes' ] && [ "$1" != 'no' ] && [ "$1" != 'ssl' ] && [ "$1" != 'reload' ]; then
1193+
check_result $E_INVALID "invalid $2 format :: $1"
1194+
fi
1195+
}
11911196

11921197
check_backup_conditions() {
11931198
# Checking load average

func/upgrade.sh

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ source $HESTIA/func/syshealth.sh
99
####### Functions & Initialization #######
1010
#####################################################################
1111

12+
add_upgrade_message (){
13+
if [ -f "$HESTIA_BACKUP/message.log" ]; then
14+
echo -e $1 >> $HESTIA_BACKUP/message.log
15+
echo -e "\n\n" >> $HESTIA_BACKUP/message.log
16+
else
17+
echo -e $1 > $HESTIA_BACKUP/message.log
18+
fi
19+
}
20+
1221
is_debug_build() {
1322
if [[ "$new_version" =~ "alpha" ]] || [[ "$new_version" =~ "beta" ]]; then
1423
DEBUG_MODE="true"
@@ -193,11 +202,11 @@ upgrade_send_notification_to_email () {
193202
echo "" >> $message_tmp_file
194203

195204
# Check for additional upgrade notes from update scripts.
196-
if [[ -z "$UPGRADE_MESSAGE" ]]; then
205+
if [[ -f "$HESTIA_BACKUP/message.log" ]]; then
197206
echo "===================================================" >> $message_tmp_file
198207
echo "The upgrade script has generated additional notifications, which must be heeded urgently:" >> $message_tmp_file
199208
echo "" >> $message_tmp_file
200-
echo -e $UPGRADE_MESSAGE >> $message_tmp_file
209+
cat $HESTIA_BACKUP/message.log >> $message_tmp_file
201210
echo "" >> $message_tmp_file
202211
echo "===================================================" >> $message_tmp_file
203212
echo "" >> $message_tmp_file
@@ -307,6 +316,15 @@ upgrade_init_backup() {
307316
if [ -e "/etc/ssh/sshd_config" ]; then
308317
mkdir -p $HESTIA_BACKUP/conf/ssh/
309318
fi
319+
if [ -d "/etc/roundcube/" ]; then
320+
mkdir -p $HESTIA_BACKUP/conf/roundcube/
321+
fi
322+
if [ -d "/etc/rainloop/" ]; then
323+
mkdir -p $HESTIA_BACKUP/conf/rainloop/
324+
fi
325+
if [ -d "/etc/phpmyadmin/" ]; then
326+
mkdir -p $HESTIA_BACKUP/conf/phpmyadmin/
327+
fi
310328
}
311329

312330
upgrade_init_logging() {
@@ -355,57 +373,47 @@ upgrade_start_backup() {
355373
if [ "$DEBUG_MODE" = "true" ]; then
356374
echo " ---- $WEB_SYSTEM"
357375
fi
358-
cp -f /etc/$WEB_SYSTEM/*.conf $HESTIA_BACKUP/conf/$WEB_SYSTEM/
359-
cp -f /etc/$WEB_SYSTEM/conf.d/*.conf $HESTIA_BACKUP/conf/$WEB_SYSTEM/
376+
cp -fr /etc/$WEB_SYSTEM/* $HESTIA_BACKUP/conf/$WEB_SYSTEM/
360377
fi
361378
if [ ! -z "$PROXY_SYSTEM" ]; then
362379
if [ "$DEBUG_MODE" = "true" ]; then
363380
echo " ---- $PROXY_SYSTEM"
364381
fi
365-
cp -f /etc/$PROXY_SYSTEM/*.conf $HESTIA_BACKUP/conf/$PROXY_SYSTEM/
366-
cp -f /etc/$PROXY_SYSTEM/conf.d/*.conf $HESTIA_BACKUP/conf/$PROXY_SYSTEM/
367-
cp -f /etc/$PROXY_SYSTEM/conf.d/*.inc $HESTIA_BACKUP/conf/$PROXY_SYSTEM/
382+
cp -fr /etc/$PROXY_SYSTEM/* $HESTIA_BACKUP/conf/$PROXY_SYSTEM/
368383
fi
369384
if [ ! -z "$IMAP_SYSTEM" ]; then
370385
if [ "$DEBUG_MODE" = "true" ]; then
371386
echo " ---- $IMAP_SYSTEM"
372387
fi
373-
cp -f /etc/$IMAP_SYSTEM/*.conf $HESTIA_BACKUP/conf/$IMAP_SYSTEM/
374-
cp -f /etc/$IMAP_SYSTEM/conf.d/*.conf $HESTIA_BACKUP/conf/$IMAP_SYSTEM/
388+
cp -fr /etc/$IMAP_SYSTEM/* $HESTIA_BACKUP/conf/$IMAP_SYSTEM/
375389
fi
376390
if [ ! -z "$MAIL_SYSTEM" ]; then
377391
if [ "$DEBUG_MODE" = "true" ]; then
378392
echo " ---- $MAIL_SYSTEM"
379393
fi
380-
cp -f /etc/$MAIL_SYSTEM/*.conf $HESTIA_BACKUP/conf/$MAIL_SYSTEM/
394+
cp -fr /etc/$MAIL_SYSTEM/* $HESTIA_BACKUP/conf/$MAIL_SYSTEM/
381395
fi
382396
if [ ! -z "$DNS_SYSTEM" ]; then
383397
if [ "$DNS_SYSTEM" = "bind9" ]; then
384398
if [ "$DEBUG_MODE" = "true" ]; then
385399
echo " ---- $DNS_SYSTEM"
386400
fi
387-
cp -f /etc/bind/*.conf $HESTIA_BACKUP/conf/$DNS_SYSTEM/
401+
cp -fr /etc/bind/* $HESTIA_BACKUP/conf/$DNS_SYSTEM/
388402
fi
389403
fi
390404
if [ ! -z "$DB_SYSTEM" ]; then
391405
if [[ "$DB_SYSTEM" =~ "mysql" ]]; then
392406
if [ "$DEBUG_MODE" = "true" ]; then
393407
echo " ---- mysql"
394408
fi
395-
cp -f /etc/mysql/*.cnf $HESTIA_BACKUP/conf/mysql/
396-
if [ -d "/etc/mysql/conf.d/" ]; then
397-
cp -f /etc/mysql/conf.d/*.cnf $HESTIA_BACKUP/conf/mysql/ > /dev/null 2>&1
398-
fi
399-
if [ -d "/etc/mysql/mariadb.conf.d/" ]; then
400-
cp -f /etc/mysql/mariadb.conf.d/*.cnf $HESTIA_BACKUP/conf/mysql/ > /dev/null 2>&1
401-
fi
409+
cp -fr /etc/mysql/* $HESTIA_BACKUP/conf/mysql/
402410
fi
403411
if [[ "$DB_SYSTEM" =~ "pgsql" ]]; then
404412
if [ "$DEBUG_MODE" = "true" ]; then
405413
echo " ---- pgsql"
406414
fi
407-
cp -f /etc/mysql/*.cnf $HESTIA_BACKUP/conf/pgsql/
408-
cp -f /etc/mysql/conf.d/*.cnf $HESTIA_BACKUP/conf/pgsql/
415+
# config for postgresql is stored in /etc/postgresql/version/main/
416+
cp -fr /etc/postgresql/* $HESTIA_BACKUP/conf/pgsql/
409417
fi
410418
fi
411419
if [ ! -z "$FTP_SYSTEM" ]; then
@@ -431,8 +439,27 @@ upgrade_start_backup() {
431439
if [ "$DEBUG_MODE" = "true" ]; then
432440
echo " ---- sshd"
433441
fi
434-
cp -f /etc/ssh/sshd_config $HESTIA_BACKUP/conf/ssh/sshd_config
442+
cp -f /etc/ssh/* $HESTIA_BACKUP/conf/ssh/
435443
fi
444+
if [ -d "/etc/roundcube" ]; then
445+
if [ "$DEBUG_MODE" = "true" ]; then
446+
echo " ---- Roundcube"
447+
fi
448+
cp -fr /etc/roundcube/* $HESTIA_BACKUP/conf/roundcube
449+
fi
450+
if [ -d "/etc/rainloop" ]; then
451+
if [ "$DEBUG_MODE" = "true" ]; then
452+
echo " ---- Rainloop"
453+
fi
454+
cp -fr /etc/roundcube/* $HESTIA_BACKUP/conf/roundcube
455+
fi
456+
if [ -d "/etc/phpmyadmin" ]; then
457+
if [ "$DEBUG_MODE" = "true" ]; then
458+
echo " ---- PHPmyAdmin"
459+
fi
460+
cp -fr /etc/phpmyadmin/* $HESTIA_BACKUP/conf/phpmyadmin
461+
fi
462+
436463
}
437464

438465
upgrade_refresh_config() {

install/hst-install-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ HESTIA_INSTALL_DIR="$HESTIA/install/deb"
2323
VERBOSE='no'
2424

2525
# Define software versions
26-
HESTIA_INSTALL_VER='1.4.13'
26+
HESTIA_INSTALL_VER='1.4.14'
2727
pma_v='5.1.1'
2828
rc_v="1.4.11"
2929
multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0")

install/hst-install-ubuntu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ HESTIA_INSTALL_DIR="$HESTIA/install/deb"
2323
VERBOSE='no'
2424

2525
# Define software versions
26-
HESTIA_INSTALL_VER='1.4.13'
26+
HESTIA_INSTALL_VER='1.4.14'
2727
pma_v='5.1.1'
2828
rc_v="1.4.11"
2929
multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0")

install/upgrade/upgrade.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# Update default templates when performing an upgrade
2222
# These flags should be set to true if any changes are made to the template files
2323
# to ensure that they are properly updated on the end-user's system.
24-
UPGRADE_UPDATE_WEB_TEMPLATES='true'
24+
UPGRADE_UPDATE_WEB_TEMPLATES='false'
2525
UPGRADE_UPDATE_MAIL_TEMPLATES='false'
2626
UPGRADE_UPDATE_DNS_TEMPLATES='false'
2727

@@ -41,9 +41,9 @@ UPGRADE_UPDATE_FILEMANAGER='false'
4141
UPGRADE_UPDATE_FILEMANAGER_CONFIG='false'
4242

4343
# Post installation clean-up
44-
UPGRADE_REPLACE_KNOWN_KEYS='true'
45-
UPGRADE_REBUILD_USERS='true'
46-
UPGRADE_RESTART_SERVICES='true'
44+
UPGRADE_REPLACE_KNOWN_KEYS='false'
45+
UPGRADE_REBUILD_USERS='false'
46+
UPGRADE_RESTART_SERVICES='false'
4747

4848
#######################################################################################
4949
####### 3rd Party Software Updates #######

install/upgrade/versions/1.4.13.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,22 @@
55
#######################################################################################
66
####### Place additional commands below. #######
77
#######################################################################################
8-
####### New Feature: UPGRADE_MESSAGE #######
8+
####### Pass trough information to the end user incase of a issue or problem #######
99
####### #######
10-
####### Add your text to UPGRADE_MESSAGE to include a message to the upgrade #######
11-
####### email. Do not overwrite the variable, it could already contains prior #######
12-
####### content of another upgrade script. Please add it using: #######
10+
####### Use add_upgrade_message "My message here" to include a message #######
11+
####### to the upgrade email. Please add it using: #######
1312
####### #######
14-
####### UPGRADE_MESSAGE="$UPGRADE_MESSAGE\nYour Upgrade Notification Text" #######
13+
####### add_upgrade_message "My message here" #######
1514
####### #######
16-
####### Always start and end with \n to generate a new line. #######
15+
####### Use again to create a new line #######
1716
#######################################################################################
1817

1918

2019
servername=$(hostname -f);
2120
# Check if hostname is valid according to RFC1178
2221
if [[ $(echo "$servername" | grep -o "\." | wc -l) -lt 2 ]] || [[ $servername =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
2322
echo "[ * ] Hostname does not follow RFC1178 standard Please check email send regarding the update!"
24-
UPGRADE_MESSAGE="$UPGRADE_MESSAGE\nWe've noticed that you're using a invalid hostname. Please have a look at the RFC1178 standard (https://datatracker.ietf.org/doc/html/rfc1178) and use a valid one (ex. hostname.domain.tld). You can change the hostname using v-change-sys-hostname and also add a ssl certificate using v-add-letsencypt-host (proper dns A record mandatory). You'll find more informations in our documentation: https://docs.hestiacp.com/admin_docs/web/ssl_certificates.html#how-to-setup-let-s-encrypt-for-the-control-panel"
23+
add_upgrade_message "We've noticed that you're using a invalid hostname. Please have a look at the RFC1178 standard (https://datatracker.ietf.org/doc/html/rfc1178) and use a valid one (ex. hostname.domain.tld). You can change the hostname using v-change-sys-hostname and also add a ssl certificate using v-add-letsencypt-host (proper dns A record mandatory). You'll find more informations in our documentation: https://docs.hestiacp.com/admin_docs/web/ssl_certificates.html#how-to-setup-let-s-encrypt-for-the-control-panel"
2524
$HESTIA/bin/v-add-user-notification admin "Invalid Hostname detected" "Warning: We've noticed that you're using a invalid hostname. Please have a look at the <a href=\"https://datatracker.ietf.org/doc/html/rfc1178\" target=\"_blank\">RFC1178 standard</a> and use a valid one (ex. hostname.domain.tld). You can change the hostname using v-change-sys-hostname and also add a ssl certificate using v-add-letsencypt-host (proper dns A record mandatory). You'll find more informations in our <a href=\"https://docs.hestiacp.com/admin_docs/web/ssl_certificates.html#how-to-setup-let-s-encrypt-for-the-control-panel\" target=\"_blank\">documentation</a>."
2625
fi
2726

install/upgrade/versions/1.4.14.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# Hestia Control Panel upgrade script for target version 1.4.14
4+
5+
#######################################################################################
6+
####### Place additional commands below. #######
7+
#######################################################################################
8+
####### Pass trough information to the end user incase of a issue or problem #######
9+
####### #######
10+
####### Use add_upgrade_message "My message here" to include a message #######
11+
####### to the upgrade email. Please add it using: #######
12+
####### #######
13+
####### add_upgrade_message "My message here" #######
14+
####### #######
15+
####### You can use \n within the string to create new lines. #######
16+
#######################################################################################
17+
18+
if [ -f "/etc/network/interfaces" ] && [ -f "/etc/netplan/60-hestia.yaml" ]; then
19+
add_upgrade_message "Warning: Please check your network config!\n\nDuring this update a network compatibility issues has been detected. Both /etc/network/interfaces and /etc/netplan/60-hestia.yaml exists. This can lead to issues after a system reboot. Please review your network configuration."
20+
$HESTIA/bin/v-add-user-notification admin "Invalid network configuration detected\n\nDuring this update a network compatibility issues has been detected. Both /etc/network/interfaces and /etc/netplan/60-hestia.yaml exists. This can lead to issues after a system reboot. Please review your network configuration."
21+
fi

src/deb/hestia/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Source: hestia
22
Package: hestia
33
Priority: optional
4-
Version: 1.4.13
4+
Version: 1.4.14
55
Section: admin
66
Maintainer: HestiaCP <info@hestiacp.com>
77
Homepage: https://www.hestiacp.com

0 commit comments

Comments
 (0)