| # 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 "Privileged power manager daemon" |
| author "chromium-os-dev@chromium.org" |
| |
| start on started boot-services |
| stop on stopping boot-services |
| respawn |
| respawn limit 20 60 # if the job respawns 20 times in 60 seconds, stop trying. |
| |
| env LOG_DIR=/var/log/power_manager |
| env RUN_DIR=/var/run/power_manager |
| env PREFS_DIR=/var/lib/power_manager |
| |
| pre-start script |
| mkdir -p ${LOG_DIR} ${RUN_DIR} |
| chmod 755 ${RUN_DIR} |
| end script |
| |
| exec powerm --prefs_dir=${PREFS_DIR} \ |
| --log_dir=${LOG_DIR} \ |
| --run_dir=${RUN_DIR} >/var/log/powerm.out 2>&1 |