| # Copyright 2022 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| description "ChromiumOS swap management daemon" |
| author "ctshao@chromium.org" |
| |
| stop on stopping ui |
| respawn |
| |
| # Validate filesystem. |
| tmpfiles /usr/lib/tmpfiles.d/swap_management.conf |
| |
| # Do not respawn if the service is terminated on purpose. |
| normal exit 0 |
| |
| # OOM score picked based on out-of-memory-handling guidelines. |
| # https://www.chromium.org/chromium-os/chromiumos-design-docs/out-of-memory-handling/ |
| oom score -900 |
| |
| exec minijail0 --config /usr/share/minijail/swap_management.conf \ |
| -- /usr/sbin/swap_management |