Skip to content

Instantly share code, notes, and snippets.

@b1tninja
Created April 21, 2019 06:08
Show Gist options
  • Save b1tninja/e3a8c67334a357960c94feb1b6ae692a to your computer and use it in GitHub Desktop.
Save b1tninja/e3a8c67334a357960c94feb1b6ae692a to your computer and use it in GitHub Desktop.
[Unit]
Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
#Wants=network-online.target
After=network-online.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
#FailureAction=reboot-force
OnFailure=systemd-reboot.service
OnFailureJobMode=ignore-dependencies
StartLimitBurst=3
StartLimitIntervalSec=600
[Service]
ExecStartPre=-/usr/bin/ip link set down dev %i
ExecStartPre=-/usr/bin/iwconfig %i mode monitor
ExecStart=-/usr/bin/hostapd /etc/hostapd/%i.conf
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment