I am having trouble getting hostapd to start as a service.  It fails when I try to start it:$ sudo service hostapd start[FAIL] Starting advanced IEEE 802.11 management: hostapd failed!From what I understand, this uses the configuration in /etc/default/hostapd:$ cat /etc/default/hostapd # Defaults for hostapd initscript## See /usr/share/doc/hostapd/README.Debian for information about alternative# methods of managing hostapd.## Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration# file and hostapd will be started during system boot. An example configuration# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz##DAEMON_CONF=DAEMON_CONF=/etc/hostapd/hostapd.conf# Additional daemon options to be appended to hostapd command:-#   -d   show more debug messages (-dd for even more)#   -K   include key data in debug messages#   -t   include timestamps in some debug messages## Note that -B (daemon mode) and -P (pidfile) options are automatically# configured by the init.d script and must not be added to DAEMON_OPTS.#DAEMON_OPTS=-dMy daemon configuration file is as follows:$ cat /etc/hostapd/hostapd.confinterface=wlan0bridge=br0driver=rtl871xdrvcountry_code=USActrl_interface=wlan0ctrl_interface_group=0ssid=KITThw_mode=gchannel=1wpa=3wpa_passphrase=georgeisyourfriendwpa_key_mgmt=WPA-PSKwpa_pairwise=TKIPrsn_pairwise=CCMPbeacon_int=100auth_algs=3macaddr_acl=0wmm_enabled=1eap_reauth_period=360000000Despite the service failing to start, I am able to start it directly on my own without error:$ sudo hostapd -d /etc/hostapd/hostapd.confrandom: Trying to read entropy from /dev/randomConfiguration file: /etc/hostapd/hostapd.confctrl_interface_group=0drv->ifindex=3Configure bridge br0 for EAPOL traffic.BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)Completing interface initializationMode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHzRATE[0] rate=10 flags=0x1RATE[1] rate=20 flags=0x1RATE[2] rate=55 flags=0x1RATE[3] rate=110 flags=0x1RATE[4] rate=60 flags=0x0RATE[5] rate=90 flags=0x0RATE[6] rate=120 flags=0x0RATE[7] rate=180 flags=0x0RATE[8] rate=240 flags=0x0RATE[9] rate=360 flags=0x0RATE[10] rate=480 flags=0x0RATE[11] rate=540 flags=0x0Flushing old station entriesDeauthenticate all stations+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2rtl871x_set_key_opsrtl871x_set_key_opsrtl871x_set_key_opsrtl871x_set_key_opsUsing interface wlan0 with hwaddr 80:1f:02:d3:cb:b8 and ssid 'KITT'Deriving WPA PSK based on passphraseSSID - hexdump_ascii(len=4):     4b 49 54 54                                       KITTPSK (ASCII passphrase) - hexdump_ascii(len=18): [REMOVED]PSK (from passphrase) - hexdump(len=32): [REMOVED]rtl871x_set_wps_assoc_resp_iertl871x_set_wps_beacon_iertl871x_set_wps_probe_resp_ieurandom: Got 20/20 bytes from /dev/urandomGMK - hexdump(len=32): [REMOVED]Key Counter - hexdump(len=32): [REMOVED]WPA: group state machine entering state GTK_INIT (VLAN-ID 0)GTK - hexdump(len=32): [REMOVED]WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)rtl871x_set_key_opsrtl871x_set_beacon_opsrtl871x_set_hidden_ssid ignore_broadcast_ssid:0, KITT,4rtl871x_set_aclwlan0: Setup of interface done.
hostapd will not start via service -- but will start directly
networking;services;init script;init.d;hostapd