diff --git a/scripts/app b/scripts/app index 2d2a17d..d1fb18b 100755 --- a/scripts/app +++ b/scripts/app @@ -80,11 +80,12 @@ else app_dir="${UMBREL_ROOT}/apps/${app}" app_data_dir="${UMBREL_ROOT}/app-data/${app}" if [[ "${app}" == "installed" ]]; then - list_installed_apps | while read app; do + for app in $(list_installed_apps); do if [[ "${app}" != "" ]]; then - "${0}" "${1}" "${app}" "${@:3}" || true + "${0}" "${1}" "${app}" "${@:3}" & fi done + wait exit fi if [[ -z "${app}" ]] || [[ ! -d "${app_dir}" ]]; then @@ -156,7 +157,7 @@ if [[ "$command" = "install" ]]; then echo "Setting up data dir for app ${app}..." mkdir -p "${app_data_dir}" rsync --archive --verbose --exclude ".gitkeep" "${app_dir}/." "${app_data_dir}" - + echo "Pulling images for app ${app}..." compose "${app}" pull diff --git a/scripts/update/01-run.sh b/scripts/update/01-run.sh index 1645b5e..6655c61 100755 --- a/scripts/update/01-run.sh +++ b/scripts/update/01-run.sh @@ -106,12 +106,13 @@ USER_FILE="${UMBREL_ROOT}/db/user.json" list_installed_apps() { cat "${USER_FILE}" 2> /dev/null | jq -r 'if has("installedApps") then .installedApps else [] end | join("\n")' || true } -list_installed_apps | while read app; do +for app in $(list_installed_apps); do if [[ "${app}" != "" ]]; then echo "${app}..." - scripts/app compose "${app}" pull + scripts/app compose "${app}" pull & fi done +wait # Stop existing containers echo "Stopping existing containers"