blob: fc101b38f28a3582bc365501ab2c44266212113b [file] [log] [blame]
# Copyright 2015 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 ARC camera service"
author "chromium-os-dev@chromium.org"
# The ARC camera service needs to start before android starts.
# We start it after system service starts, if it hasn't completed
# before android starts then it will block android from starting.
# Blocking logic is controlled by camera HAL.
start on started boot-services
stop on stopping boot-services
expect fork
respawn
pre-start script
exec logger -t "${UPSTART_JOB}" "Pre-start arc-camera"
end script
# NOTE: Do not replace this exec block with a script block for main service
# startup, at the risk of breaking forked PID tracking. Add any pre-setup to
# the pre-start script block.
# Need -G to be in video group to access /dev/video*
exec minijail0 -i -u arc-camera -g arc-camera -G -- /usr/bin/arc_camera_service
post-stop script
exec logger -t "${UPSTART_JOB}" "Post-stop arc-camera"
end script