This commit is contained in:
Callan Bryant 2020-05-23 10:26:03 +01:00
parent 26aa8a99b5
commit 944097d1c9
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA

View File

@ -290,3 +290,20 @@ Assuming you're running a systemd powered linux distribution (most of them are):
to `/etc/systemd/system/`
2. Run `sudo systemctl daemon-reload` to get systemd to see it
3. Then run `sudo systemctl enable dsnet` to enable it at boot
> How can I generate the report periodically?
Either with cron or a systemd timer. Cron is easiest:
echo '* * * * * root /usr/local/bin/dsnet report | sudo tee /etc/cron.d/dsnetreport'
Note that whilst report generation requires root, consuming the report does not
as it's just a world-readable file. This is important for web interfaces that
need to be secure.
This is also why dsnet loads its configuration from a file -- it's possible to
set permissions such that dsnet synchronises the config generated by a non-root
user. Combined with a periodic `dsnet sync` like above, it's possible to build
a secure web interface that does not require root. A web interface is currently
being created by a friend; it will not be part of dstask, rather a separate
project.