blob: 6b9e6b5002ff84ca75410d62fd33a08f04b04f14 [file] [log] [blame] [edit]
# Copyright 2023 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 ChromeOS camera diagnostics service"
author "chromium-os-dev@chromium.org"
start on started system-services
stop on stopping system-services
# Make the camera jobs killable, because if it has a leak it's better to restart
# it than to OOM-panic.
oom score 0
expect fork
respawn
respawn limit 10 5
env SECCOMP_POLICY_FILE=/usr/share/policy/cros-camera-diagnostics.policy
script
# Start constructing minijail0 args
args=""
# Use Minijail config file.
args="$args --config /usr/share/minijail/cros-camera-diagnostics.conf"
# Set seccomp filter.
args="$args -S ${SECCOMP_POLICY_FILE}"
args="$args -- /usr/bin/cros_camera_diagnostics_service"
exec minijail0 $args
end script