Feat: Prüft, on Flatpak installiert ist, bevor geupdated wird.
This commit is contained in:
parent
fcb5b666cb
commit
a63d0bb728
@ -28,6 +28,11 @@ update_packages() {
|
||||
}
|
||||
|
||||
update_flatpak() {
|
||||
if ! command -v flatpak >/dev/null 2 >&1; then
|
||||
log "Flatpak ist nicht installiert. Vorgang wird übersprungen."
|
||||
return
|
||||
fi
|
||||
|
||||
log "Führe 'flatpak update' für alle Nutzer aus"
|
||||
for user in $(getent passwd | awk -F: '$3 >= 1000 && $7 !~ /(\/sbin\/nologin|\/bin\/false|\/usr\/sbin\/nologin)/ { print $1 }'); do
|
||||
sudo -u "$user" flatpak update -y |& while IFS= read -r line; do log "$line"; done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user