blob: 9c1963da7bc706b5db9542c2ab464cab5a1b8d36 [file] [log] [blame]
# Copyright 2019 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 "Start the cros_healthd daemon"
author "chromium-os-dev@chromium.org"
# Start the cros_healthd daemon, which is responsible for reporting telemetry
# data and running diagnostics.
start on starting system-services
stop on stopping system-services
respawn
# If the job respawns 3 times in 10 seconds, stop trying.
respawn limit 3 10
pre-start script
# Prepare directory for diagnostics routine test files.
mkdir -p /var/cache/diagnostics
chown cros_healthd:cros_healthd /var/cache/diagnostics
end script
# Run the daemon.
exec /usr/bin/cros_healthd
# Wait for daemon to claim its D-Bus name before transitioning to started.
post-start exec minijail0 -u cros_healthd -g cros_healthd /usr/bin/gdbus \
wait --system --timeout 15 org.chromium.CrosHealthd