mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-09 14:42:01 -03:30
Revert "library.sh: Simplify clear_opcache"
This reverts commit 59c2297c808a44344a22966369f4b26166779d4d. Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
cfc4d57306
commit
07689a4831
@ -38,10 +38,7 @@ free=$( df "$TMPDIR" | tail -1 | awk '{ print $4 }' )
|
||||
|
||||
# EXTRACT FILES
|
||||
echo "extracting backup file $BACKUPFILE..."
|
||||
tar $compress_arg -xf "$BACKUPFILE" -C "$TMPDIR" || {
|
||||
echo "An error occurred. Abort"
|
||||
exit 1
|
||||
}
|
||||
tar $compress_arg -xf "$BACKUPFILE" -C "$TMPDIR" || exit 1
|
||||
|
||||
## SANITY CHECKS
|
||||
[[ -d "$TMPDIR"/nextcloud ]] && [[ -f "$( ls "$TMPDIR"/nextcloud-sqlbkp_*.bak 2>/dev/null )" ]] || {
|
||||
@ -189,5 +186,3 @@ ncc files:scan-app-data
|
||||
clear_opcache
|
||||
bash -c "sleep 3; service php${PHPVER}-fpm restart" &>/dev/null &
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -596,6 +596,14 @@ function get_nc_config_value() {
|
||||
}
|
||||
|
||||
function clear_opcache() {
|
||||
# shellcheck disable=SC2155
|
||||
local data_dir="$(get_nc_config_value datadirectory)"
|
||||
! [[ -d "${data_dir:-/var/www/data}/.opcache" ]] || {
|
||||
echo "Clearing opcache..."
|
||||
echo "This can take some time. Please don't interrupt the process/close your browser tab."
|
||||
rm -rf "${data_dir:-/var/www/data}/.opcache"/*
|
||||
echo "Done."
|
||||
}
|
||||
service php${PHPVER}-fpm reload
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user