opnsense-ports/sysutils/mptd/files/mptd.in
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

28 lines
494 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: mptd
# REQUIRE: dumpon root ldconfig devfs syslogd mail
# KEYWORD: nojail noyroot shutdown
. /etc/rc.subr
name=mptd
rcvar=mptd_enable
load_rc_config $name
raid_alert_mailto=${mptd_alert_mailto:-"root@localhost"}
start_cmd=mptd_start
stop_cmd="killall -9 mptd > /dev/null 2>&1"
mptd_start()
{
if [ -x "%%PREFIX%%/sbin/mptd" -a -e "/dev/mpt0" ]; then
echo "Starting mptd."
%%PREFIX%%/sbin/mptd ${raid_alert_mailto}
fi
}
run_rc_command "$1"