autoupdate.yml aktualisiert
This commit is contained in:
parent
31df030286
commit
6e07eb0840
@ -50,14 +50,17 @@
|
|||||||
create: yes
|
create: yes
|
||||||
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
||||||
block: |
|
block: |
|
||||||
g_echo_ok "Prüfe auf Systemupdates"
|
g_echo_ok "Checking for systemupdates"
|
||||||
apt-get update || g_echo_error "apt-get update fehlgeschlagen"
|
apt-get update || g_echo_error "apt-get update fehlgeschlagen"
|
||||||
if ! apt-get -s dist-upgrade 2>&1 | sed -e "s/'/'\\\\''/g; 1s/^/'/; \$s/\$/'/" | tee $g_tmp/sys-updatelist | egrep "^0.+, 0 .+, 0 .+ 0 .+\."
|
if ! hostname | grep ".mint."
|
||||||
then
|
then
|
||||||
g_echo_warn "Systemupdate wird eingespielt: $(cat $g_tmp/sys-updatelist)"
|
if ! apt-get -s dist-upgrade 2>&1 | sed -e "s/'/'\\\\''/g; 1s/^/'/; \$s/\$/'/" | tee $g_tmp/sys-updatelist | egrep "^0.+, 0 .+, 0 .+ 0 .+\."
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -yy dist-upgrade | sed -e "s/'/'\\\\''/g; 1s/^/'/; \$s/\$/'/" | tee $g_tmp/sys-update || g_echo_error "apt-get -yy dist-upgrade failed $($g_tmp/sys-update)"
|
then
|
||||||
DEBIAN_FRONTEND=noninteractive needrestart -b -r a | egrep -q "^NEEDRESTART-KSTA: [2|3]" && g_echo_warn "Server Reboot benötigt"
|
g_echo_warn "Systemupdate wird eingespielt: $(cat $g_tmp/sys-updatelist)"
|
||||||
g_echo_warn $(DEBIAN_FRONTEND=noninteractive apt-get -yy auroremove 2>&1 | egrep -A10 "^The following packages will be REMOVED:")
|
DEBIAN_FRONTEND=noninteractive apt-get -yy dist-upgrade | sed -e "s/'/'\\\\''/g; 1s/^/'/; \$s/\$/'/" | tee $g_tmp/sys-update || g_echo_error "apt-get -yy dist-upgrade failed $($g_tmp/sys-update)"
|
||||||
|
DEBIAN_FRONTEND=noninteractive needrestart -b -r a | egrep -q "^NEEDRESTART-KSTA: [2|3]" && g_echo_warn "Server Reboot benötigt"
|
||||||
|
g_echo_warn $(DEBIAN_FRONTEND=noninteractive apt-get -yy autoremove 2>&1 | egrep -A10 "^The following packages will be REMOVED:")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
[ -x /usr/bin/flatpak ] && flatpak update --system --noninteractive --force-remove
|
[ -x /usr/bin/flatpak ] && flatpak update --system --noninteractive --force-remove
|
||||||
backup: yes
|
backup: yes
|
||||||
|
Loading…
Reference in New Issue
Block a user