From fd75c105597fd8716af70c9148fbf4d9247d2c6e Mon Sep 17 00:00:00 2001 From: Douze Baie <12b@distrilab.fr> Date: Sat, 15 Jun 2024 00:22:27 +0200 Subject: [PATCH] import apps only if data source is configured --- scripts/upgrade | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4ef2536..daf1713 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,11 +93,13 @@ fi # ToDo : Add app importer config in wakka.config.php if it is not already there ? -# At last, run the YunoHost app importer -ynh_script_progression --message="Import YunoHost apps in bazar" --weight=2 -pushd $install_dir -ynh_exec_as $app ./yeswicli importer:sync -s yunohost-cli -popd +# At last, run the YunoHost app importer if its data source is configured +if [ $(grep yunohost-cli "$install_dir/wakka.config.php" | wc -l) != "0" ]; then + ynh_script_progression --message="Import YunoHost apps in bazar" --weight=2 + pushd $install_dir + ynh_exec_as $app ./yeswicli importer:sync -s yunohost-cli + popd +fi #================================================= # SECURE FILES AND DIRECTORIES