| # 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 "chromium-os-dev@chromium.org" |
| |
| 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 |
| respawn limit 20 60 # if the job respawns 20 times in 60 seconds, stop trying. |
| |
| script |
| |
| 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 |