Erweitere Skript: Update von Apps
This commit is contained in:
parent
66e68bc75f
commit
6f93bbadfc
1 changed files with 17 additions and 3 deletions
|
@ -15,19 +15,33 @@ update_db() {
|
||||||
done
|
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
|
case "$1" in
|
||||||
core-update)
|
all)
|
||||||
for i in `find "$NEXTCLOUD_ROOT" -maxdepth 1 -mindepth 1 -type d`
|
for i in `find "$NEXTCLOUD_ROOT" -maxdepth 1 -mindepth 1 -type d`
|
||||||
do
|
do
|
||||||
USER=$(stat -c %U "$i")
|
USER=$(stat -c %U "$i")
|
||||||
echo "Aktualisiere $i..."
|
echo "Aktualisiere $i..."
|
||||||
sudo -u "$USER" php "$i"/"$UPDATER" --no-interaction
|
sudo -u "$USER" php "$i"/"$UPDATER" --no-interaction
|
||||||
done
|
done
|
||||||
|
update_apps
|
||||||
|
update_db
|
||||||
;;
|
;;
|
||||||
db-update)
|
apps)
|
||||||
|
update_apps
|
||||||
|
;;
|
||||||
|
db)
|
||||||
update_db
|
update_db
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: nextcloud-updater {core-update|db-update}"
|
echo "Usage: nextcloud-updater {all|apps|db}"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue