fix(update): v2.7.1 avoid transient Nginx 502 error during 1-click web update
This commit is contained in:
1 parent
64b8339d14
commit
5cb3900c67
4 files changed
+59
-31
No files matched your search
+12
-5
@@ -261,7 +261,7 @@ if [ -t 1 ]; then
|
||||
systemctl reload nginx 2>/dev/null || true
|
||||
fail2ban-client reload >/dev/null 2>&1 || true
|
||||
else
|
||||
(nohup bash -c "sleep 2 && (systemctl reload php8.4-fpm 2>/dev/null || systemctl reload php8.2-fpm 2>/dev/null || systemctl reload php*-fpm 2>/dev/null || true); systemctl reload nginx 2>/dev/null || true; fail2ban-client reload >/dev/null 2>&1 || true" >/dev/null 2>&1 &)
|
||||
(nohup bash -c "sleep 1 && (systemctl reload php8.4-fpm 2>/dev/null || systemctl reload php8.2-fpm 2>/dev/null || systemctl reload php*-fpm 2>/dev/null || true); systemctl reload nginx 2>/dev/null || true; fail2ban-client reload >/dev/null 2>&1 || true" </dev/null >/dev/null 2>&1 &)
|
||||
fi
|
||||
|
||||
NEW_VER="Inconnue"
|
||||
@@ -279,10 +279,17 @@ echo ""
|
||||
if [ -f "$APP_DIR/version.json" ]; then
|
||||
echo -e "${C_CYAN}${C_BOLD}Nouveautés de cette version :${C_RESET}"
|
||||
php -r '
|
||||
$v = json_decode(file_get_contents("/var/www/nexus-pbx/version.json"), true);
|
||||
if (!empty($v["changelog"])) {
|
||||
foreach ($v["changelog"] as $line) {
|
||||
echo " • " . $line . "\n";
|
||||
$v = json_decode(@file_get_contents("/var/www/nexus-pbx/version.json"), true);
|
||||
if (!empty($v["changelog"]) && is_array($v["changelog"])) {
|
||||
$first = $v["changelog"][0];
|
||||
if (is_array($first) && !empty($first["changes"])) {
|
||||
foreach ($first["changes"] as $line) {
|
||||
echo " • " . $line . "\n";
|
||||
}
|
||||
} else {
|
||||
foreach ($v["changelog"] as $line) {
|
||||
if (is_string($line)) echo " • " . $line . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
'
|
||||
|
||||
Reference in new issue
Block a user