blob: da322e7241f7b42e95fcf392de90f32a5147415d [file] [log] [blame]
# Copyright 2019 The ChromiumOS Authors
# 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
# Process is not system critical but dependency of other deamons.
oom score -200
pre-start script
# Setup and clean the paths listed in tmpfiles.d config.
systemd-tmpfiles --create --remove \
/usr/lib/tmpfiles.d/on-demand/cros_healthd.conf
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