From e7028ab8e9346ccaec13f3cdc5aa0a6097c3006e Mon Sep 17 00:00:00 2001 From: Florent Date: Fri, 8 Oct 2021 20:38:07 +0200 Subject: [PATCH] Don't import dump when no index is found --- scripts/upgrade | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 1a01715..8a83fe6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -180,7 +180,10 @@ yunohost service add $app --description="Opensource next generation search API" #================================================= ynh_script_progression --message="Import the dump..." --weight=3 -if [ "$upgrade_type" == "UPGRADE_APP" ] +if [ ${#displayed_attributes[@]} -eq 0 ] +then + ynh_print_warn --message="No index found, database probably empty, skip" +elif [ "$upgrade_type" == "UPGRADE_APP" ] then tmp_dump_logs="$(mktemp -p $DUMPS_DIR)" ynh_debug --message="Running import command"