Bläddra i källkod

init: Use LogsDirectory in systemd unit file

Similarly as StateDirectory, this is mainly for image mode.
/var/log/cluster shouldn't be included in rpm package, so
use LogsDirectory to make systemd create /var/log/cluster during
corosync startup.

No code change is needed, because logging to log file is fully
configured by user in config file so there is no default to read from
environment variable.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse 8 månader sedan
förälder
incheckning
050933cf33
2 ändrade filer med 2 tillägg och 1 borttagningar
  1. 1 1
      corosync.spec.in
  2. 1 0
      init/corosync.service.in

+ 1 - 1
corosync.spec.in

@@ -209,8 +209,8 @@ fi
 %endif
 %if %{without systemd}
 %dir %{_localstatedir}/lib/corosync
-%endif
 %dir %{_localstatedir}/log/cluster
+%endif
 %{_mandir}/man7/corosync_overview.7*
 %{_mandir}/man8/corosync.8*
 %{_mandir}/man8/corosync-blackbox.8*

+ 1 - 0
init/corosync.service.in

@@ -10,6 +10,7 @@ EnvironmentFile=-@INITCONFIGDIR@/corosync
 ExecStart=@SBINDIR@/corosync -f $COROSYNC_OPTIONS
 ExecStop=@SBINDIR@/corosync-cfgtool -H --force
 StateDirectory=corosync
+LogsDirectory=cluster
 Type=notify
 
 # In typical systemd deployments, both standard outputs are forwarded to