From d153e4667582925d16c17276fd0f670fb7982902 Mon Sep 17 00:00:00 2001 From: simatec Date: Fri, 14 Jun 2024 00:01:51 +0200 Subject: [PATCH] (simatec) reindex added --- update.sh | 59 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/update.sh b/update.sh index fdf5594..b05cf90 100644 --- a/update.sh +++ b/update.sh @@ -246,27 +246,44 @@ else docker-compose up --force-recreate --build -d fi -echo -echo "${greenBold}${HLINE}" -echo "${greenBold} Piler Update completed successfully" -echo "${greenBold}${HLINE}${normal}" -echo -echo -echo "${greenBold}${HLINE}${HLINE_SMALL}" -if [ "$USE_LETSENCRYPT" = "yes" ]; then - echo "${greenBold}you can start in your Browser with https://${PILER_DOMAIN}!" -else - echo "${greenBold}you can start in your Browser with:" - echo "${greenBold}http://${PILER_DOMAIN} or http://local-ip" -fi +while true; do + read -ep "Do you want to perform the Reindex?? (y/n): " yn + case $yn in + [Yy]* ) echo "${greenBold}********* Reindex started... Please wait... *********${normal}"; break;; + [Nn]* ) echo -e "${redBold} Update without Reindex!${normal}"; finish_info;; + * ) echo -e "${redBold} Please confirm with y or n.${normal}";; + esac +done -echo "${greenBold}${HLINE}${HLINE_SMALL}${normal}" +BLA::start_loading_animation "${BLA_metro[@]}" +docker exec -u piler -w /var/tmp piler reindex -a +BLA::stop_loading_animation +finish_info -echo -echo "${blue}${HLINE}" -echo "${blue}You can remove the old unused containers on your system!" -echo "${blue}Execute the following command: docker system prune" -echo "${blue}${HLINE}${normal}" -echo -exit 0 +function finish_info { + echo + echo "${greenBold}${HLINE}" + echo "${greenBold} Piler Update completed successfully" + echo "${greenBold}${HLINE}${normal}" + echo + echo + echo "${greenBold}${HLINE}${HLINE_SMALL}" + + if [ "$USE_LETSENCRYPT" = "yes" ]; then + echo "${greenBold}you can start in your Browser with https://${PILER_DOMAIN}!" + else + echo "${greenBold}you can start in your Browser with:" + echo "${greenBold}http://${PILER_DOMAIN} or http://local-ip" + fi + + echo "${greenBold}${HLINE}${HLINE_SMALL}${normal}" + + echo + echo "${blue}${HLINE}" + echo "${blue}You can remove the old unused containers on your system!" + echo "${blue}Execute the following command: docker system prune" + echo "${blue}${HLINE}${normal}" + echo + exit 0 +}