blob: a78884154c27b96291de5a2159b439a7373fd01d [file] [log] [blame]
# Copyright (c) 2012 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 "System software update service"
author "chromium-os-dev@chromium.org"
# Note, the 'start on' line is modified by chromeos-factoryinstall ebuild
# and factorytest-init ebuild. Please do not change it without also
# changing those references.
start on starting system-services
stop on stopping system-services
respawn
expect fork
# Runs the daemon at low/idle IO priority so that updates don't
# impact system responsiveness.
exec ionice -c3 update_engine
# Put update_engine process in its own cgroup.
# Default cpu.shares is 1024.
post-start script
cgroup_dir="/sys/fs/cgroup/cpu/${UPSTART_JOB}"
mkdir -p "${cgroup_dir}"
echo $(status | cut -f 4 -d ' ') > "${cgroup_dir}/tasks"
end script