| # Copyright 2014 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 "Run a Chrome app" |
| author "chromium-os-dev@chromium.org" |
| |
| start on started boot-services |
| stop on starting pre-shutdown |
| |
| env SHARE_DIR=/usr/share/app_shell |
| env DATA_DIR=/home/chronos |
| env LOG_DIR=/var/log/ui |
| env LOG_FILE=ui.LATEST |
| |
| pre-start script |
| mkdir -p "${LOG_DIR}" |
| ln -sf ui.$(date +%Y%m%d-%H%M%S) "${LOG_DIR}/${LOG_FILE}" |
| end script |
| |
| script |
| exec app_shell_launcher >"${LOG_DIR}/${LOG_FILE}" 2>&1 |
| end script # script |
| |
| post-stop script |
| set +e |
| . /sbin/killers |
| term_process '^X$' |
| bootstat x-terminated |
| end script |