Skip to content

Commit 341f5f9

Browse files
authored
Improve PHP-FPM + add maintenance:mode (#2526)
Signed-off-by: Daniel Hansson <[email protected]>
1 parent 92cfd42 commit 341f5f9

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

nextcloud_update.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,24 @@ then
330330
apt-get update -q4 --allow-releaseinfo-change & spinner_loading
331331
fi
332332

333+
# Enter maintenance_mode
334+
nextcloud_occ_no_check maintenance_mode --on
335+
333336
# Upgrade OS dependencies
334337
export DEBIAN_FRONTEND=noninteractive ; apt-get dist-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
335338

339+
# Improve Apache for PHP-FPM
340+
if is_this_installed php"$PHPVER"-fpm
341+
then
342+
if [ -d "$PHP_FPM_DIR" ]
343+
then
344+
# Just make sure that MPM_EVENT is default
345+
a2dismod mpm_prefork
346+
a2enmod mpm_event
347+
restart_webserver
348+
fi
349+
fi
350+
336351
# Fix Realtek on PN51
337352
if asuspn51
338353
then
@@ -676,10 +691,12 @@ then
676691
chmod +x "$SCRIPTS"/updatenotification.sh
677692
fi
678693

694+
# Disable maintenance_mode
695+
nextcloud_occ_no_check maintenance_mode --off
696+
679697
# Update all Nextcloud apps
680698
if [ "${CURRENTVERSION%%.*}" -ge "15" ]
681699
then
682-
nextcloud_occ maintenance:mode --off
683700
# Check for upgrades
684701
print_text_in_color "$ICyan" "Trying to automatically update all Nextcloud apps..."
685702
UPDATED_APPS="$(nextcloud_occ_no_check app:update --all)"

0 commit comments

Comments
 (0)