Files
stats-gateway/systemd/stats-snapshot.service
T

20 lines
510 B
Desktop File

[Unit]
Description=Generate stats snapshot.json for stats-site dashboard
After=stats-gateway.service
Wants=stats-gateway.service
[Service]
Type=oneshot
User=stats
Group=www-data
ExecStart=/usr/local/bin/stats-snapshot --db /var/lib/stats-gateway/stats.db --out /var/www/stats-site/data/snapshot.json
StandardOutput=journal
StandardError=journal
# Need write access to /var/www/stats-site/data
ReadWritePaths=/var/www/stats-site/data
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true