]> git.ipfire.org Git - thirdparty/systemd.git/blame - units/systemd-timesyncd.service.in
time-wait-sync: use watchfile to coordinate with timesyncd
[thirdparty/systemd.git] / units / systemd-timesyncd.service.in
CommitLineData
a7df2d1e
ZJS
1# SPDX-License-Identifier: LGPL-2.1+
2#
a91df40e
KS
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]
11Description=Network Time Synchronization
12Documentation=man:systemd-timesyncd.service(8)
13ConditionCapability=CAP_SYS_TIME
4b16233e 14ConditionVirtualization=!container
689d781b 15DefaultDependencies=no
87a85e25 16After=systemd-remount-fs.service systemd-sysusers.service
689d781b 17Before=time-sync.target sysinit.target shutdown.target
ece6e766 18Conflicts=shutdown.target
55152b6e 19Wants=time-sync.target
a91df40e
KS
20
21[Service]
22Type=notify
23Restart=always
24RestartSec=0
87a85e25 25ExecStart=!!@rootlibexecdir@/systemd-timesyncd
0c28d51a 26WatchdogSec=3min
87a85e25 27User=systemd-timesync
48d3e88c 28DynamicUser=yes
87a85e25
YW
29CapabilityBoundingSet=CAP_SYS_TIME
30AmbientCapabilities=CAP_SYS_TIME
a349eb10 31PrivateDevices=yes
1b8689f9 32ProtectHome=yes
0c28d51a
LP
33ProtectControlGroups=yes
34ProtectKernelTunables=yes
b6c7278c 35ProtectKernelModules=yes
40652ca4 36MemoryDenyWriteExecute=yes
0c28d51a 37RestrictRealtime=yes
3c19d0b4 38RestrictNamespaces=yes
0c28d51a 39RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
2dd79846 40RuntimeDirectory=systemd/timesync
6489ccfe 41SystemCallFilter=~@cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap
7f396e5f 42SystemCallArchitectures=native
bff8f254 43LockPersonality=yes
53d133ea 44StateDirectory=systemd/timesync
a91df40e
KS
45
46[Install]
ece6e766 47WantedBy=sysinit.target