summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-10-23 00:28:17 +0200
committerLennart Poettering <lennart@poettering.net>2014-10-23 00:39:42 +0200
commit74055aa76278232ff05574fc47c4e6b3560554a7 (patch)
treecebf74b2f97108dc325ce4522962863b2b4c2f35 /units
parent0e2f14014c65b4d8b30146e414579154cfa932da (diff)
journalctl: add new --flush command and make use of it in systemd-journal-flush.service
This new command will ask the journal daemon to flush all log data stored in /run to /var, and wait for it to complete. This is useful, so that in case of Storage=persistent we can order systemd-tmpfiles-setup afterwards, to ensure any possibly newly created directory in /var/log gets proper access mode and owners.
Diffstat (limited to 'units')
-rw-r--r--units/systemd-journal-flush.service.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in
index 503e8a63b8..699670bb4e 100644
--- a/units/systemd-journal-flush.service.in
+++ b/units/systemd-journal-flush.service.in
@@ -11,8 +11,9 @@ Documentation=man:systemd-journald.service(8) man:journald.conf(5)
DefaultDependencies=no
Requires=systemd-journald.service
After=systemd-journald.service local-fs.target remote-fs.target
-Before=systemd-user-sessions.service
+Before=systemd-user-sessions.service systemd-tmpfiles-setup.service
[Service]
-ExecStart=@rootbindir@/systemctl kill --kill-who=main --signal=SIGUSR1 systemd-journald.service
+ExecStart=@rootbindir@/journalctl --flush
Type=oneshot
+RemainAfterExit=yes