>> If you (or someone) find this seperation desirable, maybe it could be
>> integrated into redis-server@.service by changing RuntimeDirectory to
>> redis-%i and ReadWriteDirectory accordingly. It is probably a bad idea
>> for all users, though.
> Most users would be using the non-templated redis-server.service, so
> this is of no consequence? ie. we should have a different
> RuntimeDirectory for the templated one, no?
>
> Just to be clear, you are also setting RuntimeDirectory=redis-%i or
> not? You say you need it, but then you don't include it in your diff...
>
>
You're right, I should have also posted the following:

# cat /etc/systemd/system/redis-server@rspamd.service.d/override.conf
[Service]
Type=simple
PIDFile=/run/redis-%i/redis-server.pid
User=_rspamd
Group=_rspamd
RuntimeDirectory=redis-%i


ReadWriteDirectories=
ReadWriteDirectories=-/var/lib/rspamd/redis
ReadWriteDirectories=-/run/redis-%i


The PIDFile, RuntimeDirectory and the last ReadWriteDirectories could be
present in the main instance file. All others (Type, User, Group and the
first ReadWriteDirectories) are specific to this instance.

I see that I also forgot to mention that I set 'daemonize' to 'no' in
order to be able to capture the log to stdout. This explain the Type=simple.

Adrien

Reply via email to