mirror of
https://github.com/YunoHost-Apps/borg_ynh.git
synced 2024-09-03 18:16:05 +02:00
fix: last listed app not being backed up
This commit is contained in:
parent
437d9abf63
commit
e9dc347468
1 changed files with 8 additions and 1 deletions
|
@ -30,7 +30,14 @@ fi
|
||||||
# Backup all apps independently
|
# Backup all apps independently
|
||||||
apps=$(yunohost app setting {{ app }} apps)
|
apps=$(yunohost app setting {{ app }} apps)
|
||||||
for app in $(yunohost app list --installed -b | grep id: | cut -d: -f2); do
|
for app in $(yunohost app list --installed -b | grep id: | cut -d: -f2); do
|
||||||
if [[ "$apps" = *"$app,"* ]] || [ "$apps" = "all" ]; then
|
backup_app=false
|
||||||
|
for selected_app in $(echo $apps | tr "," " ");do
|
||||||
|
if [[ "$selected_app" == "$app" ]] || [ "$apps" = "all" ]; then
|
||||||
|
backup_app=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "$backup_app" == "true" ];then
|
||||||
yunohost backup create $ignore_system -n auto_$app --method {{ app }}_app --apps $app
|
yunohost backup create $ignore_system -n auto_$app --method {{ app }}_app --apps $app
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue