113901Salanb#!/bin/sh 213901Salanb 313901Salanb# Copyright (c) 2003 Sean M. Kelly <smkelly@FreeBSD.org> 413901Salanb# All rights reserved. 513901Salanb# 613901Salanb# Redistribution and use in source and binary forms, with or without 713901Salanb# modification, are permitted provided that the following conditions 813901Salanb# are met: 913901Salanb# 1. Redistributions of source code must retain the above copyright 1013901Salanb# notice, this list of conditions and the following disclaimer. 1113901Salanb# 2. Redistributions in binary form must reproduce the above copyright 1213901Salanb# notice, this list of conditions and the following disclaimer in the 1313901Salanb# documentation and/or other materials provided with the distribution. 1413901Salanb# 1513901Salanb# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1613901Salanb# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1713901Salanb# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1813901Salanb# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1913901Salanb# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2013901Salanb# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2113901Salanb# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2213901Salanb# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2313901Salanb# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2413901Salanb# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2513901Salanb# SUCH DAMAGE. 2613901Salanb# 2713901Salanb# $FreeBSD$ 2813901Salanb# 2913901Salanb 3013901Salanb# PROVIDE: watchdogd 3113901Salanb# REQUIRE: FILESYSTEMS syslogd 3213901Salanb# KEYWORD: nojail shutdown 3313901Salanb 3413901Salanb. /etc/rc.subr 3513901Salanb 3613901Salanbname="watchdogd" 3713901Salanbrcvar="watchdogd_enable" 3813901Salanbcommand="/usr/sbin/${name}" 3913901Salanbpidfile="/var/run/${name}.pid" 4013901Salanb 4113901Salanbload_rc_config $name 4213901Salanbrun_rc_command "$1" 4313901Salanb