Dieses Repository beinhaltet den Code zum Betrieb des Wikipedia-Bots DerIchBot.
Installiere Pakete mit pip install -r ./requirements.txt
und ergänze die Konfigurationsdateien telegramconfig.py
und user-password.py
und ergänze mit crontab -e
folgende Cronjobs:
0 2 * * * cd /home/wikibot && .venv/bin/python cron-daily.py >> logs/daily.log 2>>logs/daily.log
0 * * * * cd /home/wikibot && .venv/bin/python cron-hourly.py >> logs/hourly.log 2>>logs/hourly.log
*/15 * * * * cd /home/wikibot && .venv/bin/python monitoring.py 2>> logs/monitoring_err.log
Ergänze außerdem Dateien der Form /etc/systemd/system/<...>.service
für webserver.py
und recentChanges.py
und registriere die Services mit systemctl enable <...>
:
[Unit]
Description=<...>
After=network.target
[Service]
WorkingDirectory=/home/wikibot
ExecStart=/home/wikibot/.venv/bin/python /home/wikibot/<...>.py
Restart=on-abnormal
StandardOutput=append:/home/wikibot/logs/<...>.log
StandardError=append:/home/wikibot/logs/<...>_err.log
[Install]
WantedBy=multi-user.target
Die Software ist für Python 3.12 und Ubuntu 20.04 getestet.