blob: 4d763b93238473f31f60fc8f20e607eee1bc8502 [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"
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