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