hostapd.service 631 B

12345678910111213141516171819
  1. [Unit]
  2. Description=Access point and authentication server for Wi-Fi and Ethernet
  3. Documentation=man:hostapd(8)
  4. After=network.target
  5. # use `systemctl list-units --all --full |grep "sys-subsystem-net-devices"` to get list of net .device
  6. BindsTo=sys-subsystem-net-devices-wireless_wifi.device
  7. After=sys-subsystem-net-devices-wireless_wifi.device
  8. [Service]
  9. Type=forking
  10. PIDFile=/run/hostapd.pid
  11. Restart=on-failure
  12. RestartSec=2
  13. Environment=DAEMON_CONF=/etc/hostapd/hostapd.conf
  14. EnvironmentFile=-/etc/default/hostapd
  15. ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF}
  16. [Install]
  17. WantedBy=multi-user.target