Files
meshcore-bot/meshcore-bot.service
T
agessaman b8b1647b27 feat(retention): enhance data retention and resource limits for Raspberry Pi
- Implemented chunked deletion for data retention, allowing for smoother cleanup processes without monopolizing SQLite's writer lock.
- Configured retention settings to delete in batches with pauses, improving performance on SD-card installations.
- Updated Linux service installers to allocate 1GB of memory and 200% CPU, providing better resource management for Raspberry Pi workloads.
- Added detailed configuration examples for Raspberry Pi in documentation to guide users on optimal settings.
2026-07-30 08:06:21 -07:00

51 lines
1.1 KiB
Desktop File

[Unit]
Description=MeshCore Bot - Mesh Network Bot Service
Documentation=https://github.com/agessaman/meshcore-bot
After=network.target
Wants=network.target
[Service]
Type=simple
User=meshcore
Group=meshcore
WorkingDirectory=/opt/meshcore-bot
ExecStart=/opt/meshcore-bot/venv/bin/python /opt/meshcore-bot/meshcore_bot.py --config /etc/meshcore-bot/config.ini
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=meshcore-bot
# Environment variables
Environment=PYTHONPATH=/opt/meshcore-bot
Environment=PYTHONUNBUFFERED=1
# Security settings
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
UMask=0077
ConfigurationDirectory=meshcore-bot
ConfigurationDirectoryMode=0700
StateDirectory=meshcore-bot
StateDirectoryMode=0700
LogsDirectory=meshcore-bot
LogsDirectoryMode=0750
ReadWritePaths=/etc/meshcore-bot
ReadWritePaths=/var/lib/meshcore-bot
ReadWritePaths=/var/log/meshcore-bot
# Resource limits
LimitNOFILE=65536
MemoryMax=1G
CPUQuota=200%
# Restart policy
StartLimitInterval=60
StartLimitBurst=3
[Install]
WantedBy=multi-user.target