blob: 78fad1b3cf1a7166f0c3eac2ca4fb3bf3306b1f2 [file] [log] [blame]
# Copyright (c) 2010 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 powerm after dbus has started"
author ""
start on started dbus
stop on starting halt or starting reboot
env LOG_DIR=/var/log/power_manager
env RUN_DIR=/var/run/power_manager
env PREFS_DIR=/var/lib/power_manager
respawn limit 20 60 # if the job respawns 20 times in 60 seconds, stop trying.
mkdir -p ${LOG_DIR} ${RUN_DIR}
# powerd will create files here as well
chmod a+w ${RUN_DIR}
exec /usr/bin/powerm \
--prefs_dir=${PREFS_DIR} \
--log_dir=${LOG_DIR} \
--run_dir=${RUN_DIR} \
> ${LOG_DIR}/powerm.out 2>&1
end script