On a CentOS Linux 7.8 system, if I create a systemd service configuration file and include LogsDirectory
and/or CacheDirectory
in the [Service]
section, then do a systemctl daemon-reload
, the following errors are printed in /var/log/messages
:
Sep 8 13:14:50 model systemd: [/etc/systemd/system/hugo-sbml.service:18] Unknown lvalue 'CacheDirectory' in section 'Service'
Sep 8 13:14:50 model systemd: [/etc/systemd/system/hugo-sbml.service:19] Unknown lvalue 'LogsDirectory' in section 'Service'
The man page for systemd.exec
is confusing: it does not document LogsDirectory
and CacheDirectory
, but it does list error codes associated with failures involving them. Googling around, those settings appear to be commonly used in systemd configuration files.
Is there a replacement for the LogsDirectory
and CacheDirectory
settings in a systemd
service configuration file on CentOS 7? Or to put it another way, what are we supposed to do if we need log and cache directories to be created?