| # 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. |
| |
| description "timberslide debugfs watcher" |
| author "chromium-os-dev@chromium.org" |
| |
| stop on stopping system-services |
| |
| normal exit 0 |
| respawn |
| respawn limit 3 10 # if the job respawns 3 times in 10 seconds, stop trying. |
| |
| # The ecloggers job starts multiple instances of timberslide for |
| # different paths. Import LOG_PATH from the start call. |
| import LOG_PATH |
| export LOG_PATH |
| instance $LOG_PATH |
| |
| script |
| # cros_ec variant name e.g. cros_ec/cros_fp/cros_pd/cros_tp. |
| cros_variant="$(basename "$(dirname "${LOG_PATH}")")" |
| # daemon output logging file, same as timerslide.conf |
| daemon_log="/var/log/timberslide.${cros_variant}.out" |
| |
| exec /usr/share/cros/init/timberslide-watcher.sh "${LOG_PATH}" \ |
| >${daemon_log} 2>&1 |
| end script |