docs: update cron setup for multi-site structure
Both README.md and BEDIENUNGSANLEITUNG.md now show the correct cron entries using --config <site>/config.yaml, one entry per site with staggered start times (03:00 / 03:15). Added "Neue Website hinzufügen" step-by-step guide and updated log-rotation path to */logs/*.log (covers all sites). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ab882f912e
commit
2f985c8d59
2 changed files with 56 additions and 13 deletions
27
README.md
27
README.md
|
|
@ -119,14 +119,35 @@ python -m scanner approve --rebuild --note "Komplettes Redesign, alle Seiten neu
|
|||
|
||||
## Cron-Setup
|
||||
|
||||
Einrichten mit `crontab -e`, folgende Zeilen einfügen — je eine pro überwachter Website,
|
||||
mit leichtem Zeitversatz damit die Scans nicht gleichzeitig laufen:
|
||||
|
||||
```cron
|
||||
# Täglich 03:00 Uhr
|
||||
0 3 * * * cd /opt/scanner && /opt/scanner/venv/bin/python -m scanner scan >> /opt/scanner/logs/cron.log 2>&1
|
||||
# Täglich 03:00 — bredelar.info
|
||||
0 3 * * * cd /home/dschlueter/Python_Programs/integrity_scanner_fuer_statische_Webseiten && python -m scanner --config bredelar.info/config.yaml scan >> bredelar.info/logs/cron.log 2>&1
|
||||
|
||||
# Täglich 03:15 — jamulix.de
|
||||
15 3 * * * cd /home/dschlueter/Python_Programs/integrity_scanner_fuer_statische_Webseiten && python -m scanner --config jamulix.de/config.yaml scan >> jamulix.de/logs/cron.log 2>&1
|
||||
```
|
||||
|
||||
**Wichtig:** Der `cd`-Befehl ist nötig, damit `python -m scanner` das Paket findet.
|
||||
Das Log landet je Site in `<site>/logs/cron.log`.
|
||||
|
||||
Nach dem Einrichten prüfen: `crontab -l`
|
||||
|
||||
### Neue Website hinzufügen
|
||||
|
||||
```bash
|
||||
mkdir neue-seite.de
|
||||
cp bredelar.info/config.yaml neue-seite.de/config.yaml
|
||||
# target + alle 4 Pfade (data_dir/reports_dir/logs_dir/config_dir) anpassen
|
||||
python -m scanner --config neue-seite.de/config.yaml init
|
||||
# Dann einen weiteren Cron-Eintrag ergänzen
|
||||
```
|
||||
|
||||
Log-Rotation (`/etc/logrotate.d/scanner`):
|
||||
```
|
||||
/opt/scanner/logs/*.log {
|
||||
/home/dschlueter/Python_Programs/integrity_scanner_fuer_statische_Webseiten/*/logs/*.log {
|
||||
daily
|
||||
rotate 30
|
||||
compress
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue