Files
pmaports-rtwo/extra-repos/systemd/systemd-services/system-vnstat.service
T
Markus Göllnitz 5c01db2b90 systemd/systemd-services: add vnstat service
Monitoring the network usage due to mobile connections
being metred is probably interesting to more users.

vnstat is also the basis for Usage's optional network
view.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7001>
2025-09-09 18:29:17 +02:00

37 lines
753 B
Desktop File

[Unit]
Description=vnStat network traffic monitor
Documentation=man:vnstatd(8) man:vnstat(1) man:vnstat.conf(5)
After=network.target
StartLimitIntervalSec=20
StartLimitBurst=4
[Service]
ExecStart=/usr/sbin/vnstatd --nodaemon
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=2
# Hardening
CapabilityBoundingSet=
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
PrivateDevices=yes
PrivateTmp=yes
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=strict
ReadWritePaths=/var/lib
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
StateDirectory=vnstat
[Install]
WantedBy=multi-user.target
Alias=vnstatd.service