xref: /freebsd/libexec/rc/rc.d/hostapd (revision 05637c82243e681b5db5d7e9829e699515456524)
1#!/bin/sh
2#
3#
4
5# PROVIDE: hostapd
6# REQUIRE: mountcritremote
7# KEYWORD: nojail shutdown
8
9. /etc/rc.subr
10
11name="hostapd"
12desc="Authenticator for IEEE 802.11 networks"
13command=${hostapd_program}
14
15ifn="$2"
16if [ -z "$ifn" ]; then
17	rcvar="hostapd_enable"
18	conf_file="/etc/${name}.conf"
19	pidfile="/var/run/${name}.pid"
20else
21	rcvar=
22	conf_file="/etc/${name}-${ifn}.conf"
23	pidfile="/var/run/${name}-${ifn}.pid"
24fi
25
26command_args="-P ${pidfile} -B ${conf_file}"
27required_files="${conf_file}"
28required_modules="wlan_xauth wlan_wep wlan_tkip wlan_ccmp wlan_gcmp"
29extra_commands="reload"
30
31load_rc_config ${name}
32
33# doesn't make sense to run in a svcj: nojail keyword
34hostapd_svcj="NO"
35
36run_rc_command "$1"
37