]> git.ipfire.org Git - thirdparty/systemd.git/blob - units/systemd-timesyncd.service.in
Merge pull request #13136 from keszybz/readd-ntp-units.d
[thirdparty/systemd.git] / units / systemd-timesyncd.service.in
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
3 # This file is part of systemd.
4 #
5 # systemd is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
9
10 [Unit]
11 Description=Network Time Synchronization
12 Documentation=man:systemd-timesyncd.service(8)
13 ConditionCapability=CAP_SYS_TIME
14 ConditionVirtualization=!container
15 DefaultDependencies=no
16 After=systemd-remount-fs.service systemd-sysusers.service
17 Before=time-set.target sysinit.target shutdown.target
18 Conflicts=chronyd.service ntpd.service
19 Conflicts=shutdown.target
20 Wants=time-set.target time-sync.target
21
22 [Service]
23 AmbientCapabilities=CAP_SYS_TIME
24 CapabilityBoundingSet=CAP_SYS_TIME
25 ExecStart=!!@rootlibexecdir@/systemd-timesyncd
26 LockPersonality=yes
27 MemoryDenyWriteExecute=yes
28 NoNewPrivileges=yes
29 PrivateDevices=yes
30 PrivateTmp=yes
31 ProtectControlGroups=yes
32 ProtectHome=yes
33 ProtectHostname=yes
34 ProtectKernelModules=yes
35 ProtectKernelTunables=yes
36 ProtectSystem=strict
37 Restart=always
38 RestartSec=0
39 RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
40 RestrictNamespaces=yes
41 RestrictRealtime=yes
42 RestrictSUIDSGID=yes
43 RuntimeDirectory=systemd/timesync
44 StateDirectory=systemd/timesync
45 SystemCallArchitectures=native
46 SystemCallErrorNumber=EPERM
47 SystemCallFilter=@system-service @clock
48 Type=notify
49 User=systemd-timesync
50 WatchdogSec=3min
51
52 [Install]
53 WantedBy=sysinit.target
54 Alias=dbus-org.freedesktop.timesync1.service