Files
workstation-config/temp-cleanup

🧹 Temp Cleanup Script

Dieses Repository enthält ein automatisiertes Cleanup-System für temporäre Dateien im Nextcloud-synchronisierten Dokumente-Ordner.


📁 Projektstruktur

workstation-config/ └── temp-cleanup/ ├── cleanup_temp.sh ├── cleanup_temp.log └── systemd/ └── cleanup-temp.service


⚙️ Zweck

Das Script löscht automatisch Dateien und leere Ordner im definierten temp-Verzeichnis nach 30 Tagen.

Ziel:

  • Verhindern von Datenmüll in synchronisierten Nextcloud-Ordnern
  • Automatische Aufräumprozesse auf Workstations

🚀 Ausführung des Services

Der Service wird über systemd (User oder System Service) ausgeführt.

📍 Typischer Pfad (Installation auf Laptop)

/home/kai/workstation-config/temp-cleanup/cleanup_temp.sh

/home/kai/workstation-config/temp-cleanup/systemd/cleanup-temp.service
muss kopiert werden nach
~/.config/systemd/user/cleanup-temp.service

🕒 Ausführungszeitpunkt

Der Service wird ausgeführt über systemd Trigger, z. B.:

beim Login (User Service)
oder beim Systemstart (System Service)
optional manuell über systemctl start


📜 Logfile

Alle Aktionen werden protokolliert in:

/home/kai/cleanup_temp.log