chiark / gitweb /
Add a systemd unit file for hippotatd.service
This mostly replicates the functionality of the existing init script.
It uses the same /etc/default/hippotatd as the init script, but loads it
using EnvironmentFile=. That means that variable assignments in that
file will work, but not more complicated shell constructs.
systemd doesn't have a convenient way to set the service user from an
environment variable, so users who have set USER in
/etc/default/hippotatd will instead need to create a drop-in file under
/etc/systemd/system/hippotatd.service.d containing something like:
[Service]
User=my-hippotat-user
The init script checks that USER (possibly set by
/etc/default/hippotatd) and LOGNAME (set by systemd based on User=)
agree to make sure that both sources agree on what user hippotatd should
run as.