| # Copyright 2019 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. |
| |
| # Simple service that always fails. Used to test handling of service failures |
| # and logging. |
| |
| description "Service that always fails" |
| author "chromium-os-dev@chromium.org" |
| |
| env PRE_START_EXIT=0 |
| env MAIN_EXIT=0 |
| env POST_START_EXIT=0 |
| import PRE_START_EXIT |
| import MAIN_EXIT |
| import POST_START_EXIT |
| |
| |
| pre-start script |
| logger "$UPSTART_JOB: pre-start message" |
| exit ${PRE_START_EXIT} |
| end script |
| |
| script |
| logger "$UPSTART_JOB: main script message" |
| exit ${MAIN_EXIT} |
| end script |
| |
| post-start script |
| logger "$UPSTART_JOB: post-start message" |
| exit ${POST_START_EXIT} |
| end script |