mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-27 01:55:32 +03:00
74055aa762
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.
20 lines
703 B
SYSTEMD
20 lines
703 B
SYSTEMD
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=Trigger Flushing of Journal to Persistent Storage
|
|
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 systemd-tmpfiles-setup.service
|
|
|
|
[Service]
|
|
ExecStart=@rootbindir@/journalctl --flush
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|