blob: 8202cc14e6eb3d81f8f5cfaa41f3c26f908749fe [file] [log] [blame]
# Copyright (c) 2014 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 "Metrics Library upstart file"
author "chromium-os-dev@chromium.org"
# The metrics library is used by several programs (daemons and others)
# to send UMA stats.
start on starting boot-services
pre-start script
# Create the file used as communication endpoint for metrics.
METRICS_DIR=/var/lib/metrics
EVENTS_FILE=${METRICS_DIR}/uma-events
mkdir -p ${METRICS_DIR}
touch ${EVENTS_FILE}
chown chronos.chronos ${EVENT_FILE}
chmod 666 ${EVENTS_FILE}
# TRANSITION ONLY.
# TODO(semenzato) Remove after Chrome change, see issue 447256.
# Let Chrome read the metrics file from the old location.
mkdir -p /var/run/metrics
ln -s ${EVENTS_FILE} /var/run/metrics
end script