blob: f173525f2e389f041a3e0bfdf7bc71fd75dc818a [file] [log] [blame]
Jan Kundráta6b3f5a2020-01-29 19:27:28 +01001# CzechLight-specific configuration:
2#
3# - do not record a failed unit when that thing dies (likely due to a network issue)
4# - only start when a custom config file exists
5# - do not bring in a network-online.target because that might trigger
6# extra failure reports (and a watchdog action)
7# - keep retrying upon failure(s)
8
9[Unit]
10Description=Journal Remote Upload Service
11
12[Service]
13DynamicUser=yes
14LockPersonality=yes
15MemoryDenyWriteExecute=yes
16PrivateDevices=yes
17ProtectControlGroups=yes
18ProtectHome=yes
19ProtectHostname=yes
20ProtectKernelModules=yes
21ProtectKernelTunables=yes
22RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
23RestrictNamespaces=yes
24RestrictRealtime=yes
25StateDirectory=systemd/journal-upload
26SupplementaryGroups=systemd-journal
27SystemCallArchitectures=native
28User=systemd-journal-upload
29WatchdogSec=3min
30LimitNOFILE=524288
31
32# - ignore failures
33# - read (one) location from the env file
34ExecStart=-/usr/lib/systemd/systemd-journal-upload --save-state --url=${DESTINATION}
35EnvironmentFile=-/cfg/journald-remote
36
37# run forever and ignore any network issues
38Restart=always
39RestartSec=5
40
41[Unit]
42# shared as an env file
43ConditionFileNotEmpty=/cfg/journald-remote