1155236Sflz#!/bin/sh 2155236Sflz# 3155236Sflz# $FreeBSD: releng/10.2/etc/rc.d/hostapd 252230 2013-06-26 04:00:52Z rpaulo $ 4155236Sflz# 5155236Sflz 6155236Sflz# PROVIDE: hostapd 7155236Sflz# REQUIRE: mountcritremote 8155236Sflz# KEYWORD: nojail shutdown 9155236Sflz 10155236Sflz. /etc/rc.subr 11155236Sflz 12155236Sflzname="hostapd" 13155236Sflzcommand="/usr/sbin/${name}" 14155236Sflz 15252230Srpauloifn="$2" 16252230Srpauloif [ -z "$ifn" ]; then 17252230Srpaulo rcvar="hostapd_enable" 18252230Srpaulo conf_file="/etc/${name}.conf" 19252230Srpaulo pidfile="/var/run/${name}.pid" 20252230Srpauloelse 21252230Srpaulo rcvar= 22252230Srpaulo conf_file="/etc/${name}-${ifn}.conf" 23252230Srpaulo pidfile="/var/run/${name}-${ifn}.pid" 24252230Srpaulofi 25155236Sflz 26173616Sbrixcommand_args="-P ${pidfile} -B ${conf_file}" 27155236Sflzrequired_files="${conf_file}" 28178356Ssamrequired_modules="wlan_xauth wlan_wep wlan_tkip wlan_ccmp" 29173616Sbrixextra_commands="reload" 30155236Sflz 31155236Sflzload_rc_config ${name} 32155236Sflzrun_rc_command "$1" 33