diff --git a/bin/ncp-restore b/bin/ncp-restore index 228afc6d..e22bd703 100755 --- a/bin/ncp-restore +++ b/bin/ncp-restore @@ -103,8 +103,6 @@ fi cd "$NCDIR" -clear_opcache - ### INCLUDEDATA=yes situation NUMFILES=2 if [[ $( ls "$TMPDIR" | wc -l ) -eq $NUMFILES ]]; then @@ -183,6 +181,5 @@ ncc files:scan-app-data # restart PHP if needed [[ "$NEED_RESTART" == "1" ]] && { - clear_opcache - bash -c "sleep 3; service php${PHPVER}-fpm restart" &>/dev/null & + bash -c "sleep 5; source /usr/local/etc/library.sh; clear_opcache; service php${PHPVER}-fpm restart" &>/dev/null & } diff --git a/bin/ncp-update-nc b/bin/ncp-update-nc index 2e688398..7ae4a1d7 100755 --- a/bin/ncp-update-nc +++ b/bin/ncp-update-nc @@ -184,9 +184,6 @@ chown -R www-data:www-data nextcloud find nextcloud/ -type d -exec chmod 750 {} \; find nextcloud/ -type f -exec chmod 640 {} \; -# Clear PHP opcache -clear_opcache - # upgrade #################### echo "Upgrade..." @@ -250,7 +247,6 @@ then apt-get install -y --no-install-recommends -t "$RELEASE" "${PHP_PACKAGES_OLD[@]}" set_ncpcfg "php_version" "${PHPVER_OLD}" install_template "php/opcache.ini.sh" "/etc/php/${PHPVER_NEW}/mods-available/opcache.ini" - clear_opcache run_app nc-limits a2enconf "php${PHPVER_OLD}-fpm" service "php${PHPVER_OLD}-fpm" start @@ -308,3 +304,5 @@ mv "$BKP" "$DATADIR"/ncp-update-backups chown -R www-data:www-data "$DATADIR"/ncp-update-backups BKP="$DATADIR"/ncp-update-backups/"$( basename "$BKP" )" echo "Backup stored at $BKP" + +bash -c "sleep 5; source /usr/local/etc/library.sh; clear_opcache;" &>/dev/null & diff --git a/bin/ncp/CONFIG/nc-limits.sh b/bin/ncp/CONFIG/nc-limits.sh index bcbe63ea..3ce229b4 100644 --- a/bin/ncp/CONFIG/nc-limits.sh +++ b/bin/ncp/CONFIG/nc-limits.sh @@ -80,8 +80,7 @@ configure() # RESTART PHP [[ "$require_fpm_restart" == "true" ]] && { - clear_opcache - bash -c "sleep 3; service php${PHPVER}-fpm restart" &>/dev/null & + bash -c "sleep 3; source /usr/local/etc/library.sh; clear_opcache; service php${PHPVER}-fpm restart" &>/dev/null & } # redis max memory diff --git a/bin/ncp/TOOLS/clear-php-opcache.sh b/bin/ncp/TOOLS/clear-php-opcache.sh index 8f3e0a62..7aed7bce 100644 --- a/bin/ncp/TOOLS/clear-php-opcache.sh +++ b/bin/ncp/TOOLS/clear-php-opcache.sh @@ -12,7 +12,8 @@ configure() { echo "Clearing opcache..." - clear_opcache + bash -c "sleep 5; source /usr/local/etc/library.sh; clear_opcache;" &>/dev/null & + echo "Done." } install() { :; } diff --git a/updates/1.50.0.sh b/updates/1.50.0.sh index 9aa6cd78..5799fe13 100644 --- a/updates/1.50.0.sh +++ b/updates/1.50.0.sh @@ -2,8 +2,5 @@ set -e export NCPCFG=/usr/local/etc/ncp.cfg -source /usr/local/etc/library.sh - -clear_opcache -bash -c "sleep 6; service php${PHPVER}-fpm restart" &>/dev/null & +bash -c "sleep 6; source /usr/local/etc/library.sh; clear_opcache" &>/dev/null & diff --git a/updates/1.50.1.sh b/updates/1.50.1.sh index 645f184a..d8ef3837 100644 --- a/updates/1.50.1.sh +++ b/updates/1.50.1.sh @@ -6,5 +6,4 @@ source /usr/local/etc/library.sh install_template systemd/notify_push.service.sh /etc/systemd/system/notify_push.service -clear_opcache -bash -c "sleep 6; service php${PHPVER}-fpm restart" &>/dev/null & +bash -c "sleep 6; source /usr/local/etc/library.sh; clear_opcache; service php${PHPVER}-fpm reload" &>/dev/null &