blob: 6f1bede44ae5606fe280269bb8c64078a333ea24 [file] [log] [blame]
# 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 "Simple Watchdog daemon"
author "chromium-os-dev@chromium.org"
start on started boot-services
stop on stopping boot-services
respawn
env wdt_cmd="/sbin/minijail0 -u watchdog -g watchdog -- /usr/sbin/daisydog"
pre-start script
# Run in "check" mode to determine if the last reset was because
# of a watchdog timeout.
if ${wdt_cmd} -c | grep -Fq "watchdog-timeout"; then
metrics_client -v HwWatchdogReboot
fi
end script
exec chrt -r 99 ${wdt_cmd}