README angepasst
This commit is contained in:
+13
-32
@@ -1,7 +1,6 @@
|
||||
# 🧹 Temp Cleanup Script
|
||||
|
||||
Dieses Repository enthält ein automatisiertes Cleanup-System für temporäre Dateien im Nextcloud-synchronisierten Dokumente-Ordner.
|
||||
|
||||
Dieses Repository enthält ein automatisiertes Cleanup-System für temporäre Dateien im durch Nextcloud synchronisierten Dokumente-Ordner.
|
||||
Es entfernt automatisch Dateien und leere Ordner nach 30 Tagen und sorgt so für eine saubere, schlanke Synchronisationsstruktur.
|
||||
|
||||
---
|
||||
@@ -36,28 +35,18 @@ Der Service wird über **systemd (User oder System Service)** ausgeführt.
|
||||
|
||||
## 📍 Installationspfade (Laptop)
|
||||
|
||||
### Script
|
||||
/home/kai/workstation-config/temp-cleanup/cleanup_temp.sh
|
||||
Einfach auf einem neuen Laptop ausführen:
|
||||
|
||||
### Service Datei (im Repo)
|
||||
/home/kai/workstation-config/temp-cleanup/systemd/cleanup-temp.service
|
||||
|
||||
### Zielort für systemd (User Service)
|
||||
~/.config/systemd/user/cleanup-temp.service
|
||||
|
||||
👉 Die Service-Datei muss bei Änderungen manuell kopiert werden.
|
||||
```bash
|
||||
curl -s http://192.168.178.5:3000/kai/workstation-config/raw/branch/main/install.sh | bash
|
||||
|
||||
---
|
||||
|
||||
# 🔄 Service Installation / Reload
|
||||
# 🔄 Updates
|
||||
|
||||
Nach Änderungen der Service-Datei:
|
||||
Das System aktualisiert sich über Git:
|
||||
|
||||
cp ~/workstation-config/temp-cleanup/systemd/cleanup-temp.service ~/.config/systemd/user/
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user restart cleanup-temp.service
|
||||
|
||||
---
|
||||
curl -s http://192.168.178.5:3000/kai/workstation-config/raw/branch/main/install.sh | bash
|
||||
|
||||
# 🕒 Ausführungszeitpunkt
|
||||
|
||||
@@ -85,23 +74,15 @@ Enthält:
|
||||
|
||||
# 🧪 Manueller Test
|
||||
|
||||
## Script direkt ausführen
|
||||
~/workstation-config/temp-cleanup/cleanup_temp.sh
|
||||
|
||||
## Testdateien erstellen (älter als 30 Tage simulieren)
|
||||
mkdir -p ~/Dokumente/temp
|
||||
# Testordner + alte Datei erzeugen
|
||||
mkdir -p ~/Dokumente/temp && \
|
||||
touch -d "40 days ago" ~/Dokumente/temp/test_old_file.txt
|
||||
|
||||
## Testlauf starten
|
||||
~/workstation-config/temp-cleanup/cleanup_temp.sh
|
||||
# Cleanup manuell ausführen
|
||||
bash ~/workstation-config/temp-cleanup/cleanup_temp.sh
|
||||
|
||||
## Ergebnis prüfen
|
||||
ls -la ~/Dokumente/temp
|
||||
cat ~/cleanup_temp.log
|
||||
|
||||
## Leere Ordner testen
|
||||
mkdir -p ~/Dokumente/temp/old_folder
|
||||
~/workstation-config/temp-cleanup/cleanup_temp.sh
|
||||
# Ergebnis prüfen
|
||||
ls ~/Dokumente/temp
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user