Add temp cleanup script, systemd service and documentation
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user