| # Copyright 2022 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 crash sender on login" |
| author "chromium-os-dev@chromium.org" |
| |
| start on start-user-session |
| stop on stopping ui |
| |
| # Allow us to be killed as we are not critical to the system. If we have a |
| # leak, better to crash than to OOM-panic the system. |
| oom score -100 |
| # TODO: Add a "limit as" directive here and in crash-sender.conf |
| # https://crbug.com/391887 |
| |
| # Extra arguments for boards to add. |
| env CRASH_SENDER_ARGS="" |
| |
| script |
| # We already do a lot on login. Wait 5 minutes to avoid contributing |
| # significantly to system load. |
| # Don't wait when testing crash-reporter itself, since the delay would make |
| # the tests slower for no compelling reason. |
| if [ ! -e /run/crash_reporter/crash-test-in-progress ]; then |
| sleep 300 |
| fi |
| # Run crash_sender after log-in, instead of waiting for the normal hour |
| # between sends. Users with serious issues will generally not leave their |
| # cryptohome mounted for an hour; we don't want to lose those reports. |
| exec /sbin/crash_sender ${CRASH_SENDER_ARGS} |
| end script |