From 8e9c60b3904122aaf66ffce4f69ee0b840e82a19 Mon Sep 17 00:00:00 2001 From: kai Date: Fri, 24 Apr 2026 12:24:18 +0200 Subject: [PATCH] Add temp cleanup script, systemd service and documentation --- temp-cleanup/README.md | 55 ++++++++++++++++++++++++++++++++++++++++++ test | 1 - 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 temp-cleanup/README.md delete mode 100644 test diff --git a/temp-cleanup/README.md b/temp-cleanup/README.md new file mode 100644 index 0000000..b46b88c --- /dev/null +++ b/temp-cleanup/README.md @@ -0,0 +1,55 @@ +# 🧹 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) + +```bash +/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 + + diff --git a/test b/test deleted file mode 100644 index 30d74d2..0000000 --- a/test +++ /dev/null @@ -1 +0,0 @@ -test \ No newline at end of file