1 # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 description "Run the tlsdate daemon to set the system time" 6 author "chromium-os-dev (at] chromium.org" 7 8 start on started system-services 9 stop on stopping system-services 10 respawn 11 12 script 13 GOOGLE_CERTS=/usr/share/chromeos-ca-certificates 14 mkdir -m 755 -p /var/cache/tlsdated 15 # Make sure the timestamp file has the proper permissions. 16 chmod 0644 /var/cache/tlsdated/timestamp || true 17 # When it runs tlsdate, tlsdated stitches together an argument vector for it 18 # as follows: it begins with everything supplied to it after the --, then 19 # appends -H $host -p $port, and maybe -x $proxy if it has a proxy to use. 20 exec tlsdated -v -- /usr/bin/tlsdate -v -C "$GOOGLE_CERTS" -l \ 21 2>&1 | logger -t tlsdate 22 end script 23