I have two wireless interfaces and I want to run different APs on each. (Neither hardware supports multiple SSIDs.)
I have a .conf file for each interface. How do I get hostapd to use them both automatically?
This works fine:
# hostapd -dd /etd/hostapd/hostapd.wlan0.conf /etc/hostapd/hostapd.wlan1.conf
The problem is getting it to work automatically.
One claim is to set in /etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.wlan0.conf /etc/hostapd/hostapd.wlan1.conf"
but this doesn't work because the whole string is interpreted as being one file -- which doesn't exist.
I see this is used by /usr/lib/systemd/system/hostapd.service as
ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF}
However, I also see something called /usr/lib/systemd/system/[email protected] which does something different:
ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.%i.pid $DAEMON_OPTS /etc/hostapd/%i.conf
(what does %i mean?)
However, systemctl seems only to know about hostapd and not about hostapd@.