Skip to content

Commit 01e61b3

Browse files
committed
Prevent issues with Hestia installers where hestia-php and hestia-nginx
upgrades before Hestia package and where the new hestiaweb user is missing. Also make sure syshealth_adapt_hestia_nginx_listen_ports function is pressent
1 parent 6b3da18 commit 01e61b3

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

src/deb/nginx/control

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

src/deb/nginx/postinst

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,29 @@ if [ "$1" != "configure" ]; then
66
exit 0
77
fi
88

9+
# Run triggers only on updates
10+
if [ ! -e "/usr/local/hestia/data/users/" ]; then
11+
exit
12+
fi
13+
14+
# Prevent running and causes issues with outdated hestia version
15+
if ! id "hestiaweb" &> /dev/null; then
16+
exit
17+
fi
18+
919
# Touch and set permisions on default log files on installation
1020
update-rc.d hestia defaults > /dev/null
1121
invoke-rc.d hestia start || true
1222

1323
# Adapt Port Listing in HESTIA NGINX Backend
1424
source /usr/local/hestia/func/syshealth.sh # Load syshealth functions
15-
syshealth_adapt_hestia_nginx_listen_ports # Adapt port listing
16-
syshealth_adapt_nginx_resolver
1725

18-
# Run triggers only on updates
19-
if [ ! -e "/usr/local/hestia/data/users/" ]; then
26+
# Check if the function syshealth_adapt_hestia_nginx_listen_ports exists
27+
if ! declare -f syshealth_adapt_hestia_nginx_listen_ports > /dev/null; then
2028
exit
2129
fi
30+
syshealth_adapt_hestia_nginx_listen_ports # Adapt port listing
31+
syshealth_adapt_nginx_resolver
2232

2333
###############################################################
2434
# Initialize functions/variables #

src/deb/php/control

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

src/deb/php/postinst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ if [ ! -e "/usr/local/hestia/data/users/" ]; then
1111
exit
1212
fi
1313

14+
# Prevent running and causes issues with outdated hestia version
15+
if ! id "hestiaweb" &> /dev/null; then
16+
exit
17+
fi
18+
1419
# Check if preinstall hook exists
1520
if [ -e "/etc/hestiacp/hooks/php/pre_install.sh" ]; then
1621
/etc/hestiacp/hooks/php/pre_install.sh

0 commit comments

Comments
 (0)