mirror of
https://github.com/azlux/log2ram.git
synced 2023-10-10 13:37:24 +02:00
01632f9cb1
This changes log2ram dependencies to start as early as possible, before other services that may require access to /var/log, including rsyslog and systemd-journald. Additional dependencies on shutdown.target are required to ensure that the service will be stopped at shutdown/reboot when DefaultDependencies is set to "no" [1]. RequiresMountsFor declares dependency on /var mount when it is a mount point. IgnoreOnIsolate prevents stopping the service when isolating another unit. [1]: https://www.freedesktop.org/software/systemd/man/systemd.service.html
19 lines
449 B
Desktop File
19 lines
449 B
Desktop File
[Unit]
|
|
Description=Log2Ram
|
|
DefaultDependencies=no
|
|
Before=rsyslog.service syslog.target systemd-journald.service sysinit.target shutdown.target
|
|
After=local-fs.target
|
|
Conflicts=shutdown.target
|
|
RequiresMountsFor=/var/log /var/log.hdd
|
|
IgnoreOnIsolate=yes
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart= /usr/local/bin/log2ram start
|
|
ExecStop= /usr/local/bin/log2ram stop
|
|
ExecReload= /usr/local/bin/log2ram write
|
|
RemainAfterExit=yes
|
|
|
|
[Install]
|
|
WantedBy=sysinit.target
|