examples: improve chrony-wait service
Use the systemd TimeoutStartSec setting to report a timeout instead of an error and reduce the timeout to 3 minutes.
This commit is contained in:
parent
b7c7c293e5
commit
7d3798d7cd
1 changed files with 5 additions and 3 deletions
|
@ -8,9 +8,11 @@ Wants=time-sync.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
# Wait up to ~10 minutes for chronyd to synchronize and the remaining
|
# Wait for chronyd to update the clock and the remaining
|
||||||
# clock correction to be less than 0.1 seconds
|
# correction to be less than 0.1 seconds
|
||||||
ExecStart=/usr/bin/chronyc -h 127.0.0.1,::1 waitsync 600 0.1 0.0 1
|
ExecStart=/usr/bin/chronyc -h 127.0.0.1,::1 waitsync 0 0.1 0.0 1
|
||||||
|
# Wait for at most 3 minutes
|
||||||
|
TimeoutStartSec=180
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
StandardOutput=null
|
StandardOutput=null
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue