Add system-maintenance
authorMartin Pitt <martin@piware.de>
Tue, 23 Jul 2019 16:45:29 +0000 (18:45 +0200)
committerMartin Pitt <martin@piware.de>
Tue, 23 Jul 2019 16:45:29 +0000 (18:45 +0200)
Script to run weekly for rebuilding the OSTree and trimming the SSD.

system-maintenance [new file with mode: 0755]

diff --git a/system-maintenance b/system-maintenance
new file mode 100755 (executable)
index 0000000..96af4b3
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -eux
+
+rpm-ostree cleanup --rollback
+rpm-ostree cleanup --repomd
+rpm-ostree cleanup --base
+
+rm -rf /srv/ostree/repo/
+(cd ~martin/src/workstation-ostree-config/; ./compose.sh)
+rpm-ostree upgrade
+
+fstrim -av