blob: 763f1cb332b658ecb4545813ce45a639957bfb6e [file] [log] [blame]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Run the tlsdate daemon to set the system time"
author ""
start on started system-services
stop on stopping system-services
# We sync time from Google servers, so use the reduced set of certs that we
# have specifically for talking to Google systems.
env GOOGLE_CERTS=/usr/share/chromeos-ca-certificates
pre-start script
mkdir -m 755 -p /var/cache/tlsdated
# Make sure the timestamp file has the proper permissions if it exists.
chmod 0644 /var/cache/tlsdated/timestamp || true
end script
# When it runs tlsdate, tlsdated stitches together an argument vector for it
# as follows: it begins with everything supplied to it after the --, then
# appends -H $host -p $port, and maybe -x $proxy if it has a proxy to use.
exec tlsdated -v -- /usr/bin/tlsdate -v -C "$GOOGLE_CERTS" -l \
2>&1 | logger -t tlsdate