From acd55aaeddc490911337a4e4f2868994d80e48eb Mon Sep 17 00:00:00 2001 From: frju365 Date: Sat, 16 May 2020 19:50:01 +0200 Subject: [PATCH] Make restore working --- scripts/restore | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/restore b/scripts/restore index e206ef7..4368323 100644 --- a/scripts/restore +++ b/scripts/restore @@ -58,6 +58,24 @@ ynh_script_progression --message="Restoring the app main directory..." --time -- ynh_restore_file --origin_path="$final_path" +#================================================= +# RESTORE Meilisearch +#================================================= + +ynh_script_progression --message="Download again binary for the API." --time --weight=1 + +arch=$(ynh_detect_arch) + +if [ "$arch" != "amd64" ] && [ "$arch" != "armv8" ] +then + ynh_die --message="Your OS Architecture is not supported" +fi + +release_file=meilisearch-linux-$arch +curl -OL https://github.com/meilisearch/MeiliSearch/releases/download/$latest/meilisearch-linux-$arch +chmod +x "$release_file" +mv "$release_file" /usr/bin/meilisearch + #================================================= # RECREATE THE DEDICATED USER #=================================================