From 6f93bbadfc6939cb403f3f14c8f66e399dd5aeac Mon Sep 17 00:00:00 2001 From: phil Date: Wed, 18 Aug 2021 21:22:15 +0200 Subject: [PATCH] Erweitere Skript: Update von Apps --- templates/nextcloud-updater.j2 | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/templates/nextcloud-updater.j2 b/templates/nextcloud-updater.j2 index 0861aa3..9420c95 100644 --- a/templates/nextcloud-updater.j2 +++ b/templates/nextcloud-updater.j2 @@ -15,19 +15,33 @@ update_db() { done } +update_apps() { + for k in `find "$NEXTCLOUD_ROOT" -maxdepth 1 -mindepth 1 -type d` + do + USER=$(stat -c %U "$k") + echo "Aktualisiere $k..." + sudo -u "$USER" php "$k"/occ app:update --all + done +} + case "$1" in - core-update) + all) for i in `find "$NEXTCLOUD_ROOT" -maxdepth 1 -mindepth 1 -type d` do USER=$(stat -c %U "$i") echo "Aktualisiere $i..." sudo -u "$USER" php "$i"/"$UPDATER" --no-interaction done + update_apps + update_db ;; - db-update) + apps) + update_apps + ;; + db) update_db ;; *) - echo "Usage: nextcloud-updater {core-update|db-update}" + echo "Usage: nextcloud-updater {all|apps|db}" exit 1 esac