xref: /freebsd/libexec/rc/rc.d/hastd (revision a64729f5077d77e13b9497cb33ecb3c82e606ee8)
1#!/bin/sh
2#
3#
4
5# PROVIDE: hastd
6# REQUIRE: NETWORKING syslogd
7# BEFORE:  DAEMON
8# KEYWORD: nojail shutdown
9
10. /etc/rc.subr
11
12name="hastd"
13desc="Highly Available Storage daemon"
14rcvar="hastd_enable"
15pidfile="/var/run/${name}.pid"
16command="/sbin/${name}"
17hastctl="/sbin/hastctl"
18required_files="/etc/hast.conf"
19stop_precmd="hastd_stop_precmd"
20required_modules="geom_gate:g_gate"
21extra_commands="reload"
22
23hastd_stop_precmd()
24{
25	${hastctl} role init all
26}
27
28load_rc_config $name
29
30# doesn't make sense to run in a svcj: nojail keyword
31hastd_svcj="NO"
32
33run_rc_command "$1"
34