.bashrc aktualisiert
Prüfung, ob ein Neustart notwendig ist und Datum bei Start und Ende
This commit is contained in:
parent
0eeec269a5
commit
8f218734b4
17
.bashrc
17
.bashrc
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
sysupdate() {
|
sysupdate() {
|
||||||
set -u
|
set -u
|
||||||
echo "=== Updates und Systemwartung gestartet ==="
|
echo "=== Updates und Systemwartung gestartet $(date --iso-8601=seconds) ==="
|
||||||
|
|
||||||
apt-get update &&
|
apt-get update &&
|
||||||
apt-get upgrade -y &&
|
apt-get upgrade -y &&
|
||||||
@ -32,13 +32,18 @@ sysupdate() {
|
|||||||
|
|
||||||
journalctl --vacuum-time=30d || echo "Journal-Bereinigung fehlgeschlagen" >&2
|
journalctl --vacuum-time=30d || echo "Journal-Bereinigung fehlgeschlagen" >&2
|
||||||
|
|
||||||
echo "=== Updates und Systemwartung abgeschlossen ==="
|
|
||||||
|
if command -v needrestart >/dev/null 2>&1; then
|
||||||
|
needrestart || echo "WARNUNG: needrestart - Neustart erforderlich" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "=== Updates und Systemwartung abgeschlossen $(date --iso-8601=seconds) ==="
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sysupdatefull() {
|
sysupdatefull() {
|
||||||
set -u
|
set -u
|
||||||
echo "=== Vollupgrade und Systemwartung gestartet ==="
|
echo "=== Vollupgrade und Systemwartung gestartet $(date --iso-8601=seconds) ==="
|
||||||
|
|
||||||
apt-get update &&
|
apt-get update &&
|
||||||
apt-get full-upgrade -y &&
|
apt-get full-upgrade -y &&
|
||||||
@ -67,5 +72,9 @@ sysupdatefull() {
|
|||||||
|
|
||||||
journalctl --vacuum-time=30d || echo "Journal-Bereinigung fehlgeschlagen" >&2
|
journalctl --vacuum-time=30d || echo "Journal-Bereinigung fehlgeschlagen" >&2
|
||||||
|
|
||||||
echo "=== Vollupgrade und Systemwartung abgeschlossen ==="
|
if command -v needrestart >/dev/null 2>&1; then
|
||||||
|
needrestart || echo "WARNUNG: needrestart - Neustart erforderlich" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "=== Vollupgrade und Systemwartung abgeschlossen $(date --iso-8601=seconds) ==="
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user