| 1 |
[Unit] |
| 2 |
Description=Access point and authentication server for Wi-Fi and Ethernet (%I) |
| 3 |
Documentation=man:hostapd(8) |
| 4 |
After=network.target |
| 5 |
BindsTo=sys-subsystem-net-devices-%i.device |
| 6 |
ConditionFileNotEmpty=/etc/hostapd/%i.conf |
| 7 |
|
| 8 |
[Service] |
| 9 |
Type=forking |
| 10 |
PIDFile=/run/hostapd.%i.pid |
| 11 |
Restart=on-failure |
| 12 |
RestartSec=2 |
| 13 |
EnvironmentFile=-/etc/default/hostapd |
| 14 |
ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.%i.pid $DAEMON_OPTS /etc/hostapd/%i.conf |
| 15 |
|
| 16 |
[Install] |
| 17 |
WantedBy=multi-user.target sys-subsystem-net-devices-%i.device |