From b5bc04fa543aa99ca4a44dd7dd6f59c1dda5db72 Mon Sep 17 00:00:00 2001 From: szaimen Date: Sat, 22 May 2021 21:32:36 +0200 Subject: [PATCH] previewgenerator - allow to clear all previews (#1985) --- apps/previewgenerator.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/previewgenerator.sh b/apps/previewgenerator.sh index 7c596bd1..9505cc81 100644 --- a/apps/previewgenerator.sh +++ b/apps/previewgenerator.sh @@ -61,6 +61,17 @@ else apt purge ffmpeg -y fi apt autoremove -y + if yesno_box_no "Do you want to remove all previews that were generated until now? +This will most likely clear a lot of space but your server will need to re-generate the previews \ +if you should opt to re-enable previews again." + then + print_text_in_color "$ICyan" "Removing the preview folder. This can take a while..." + rm -r "$NCDATA"/appdata_*/preview + print_text_in_color "$ICyan" "Scanning Nextclouds appdata directory after removing all previews. \ +This can take a while..." + nextcloud_occ files:scan-app-data -vvv + msg_box "All previews were successfully removed." + fi # Show successful uninstall if applicable removal_popup "$SCRIPT_NAME" fi