summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recipes-connectivity/hostapd-example/hostapd-example/aquila-am69/hostapd-example.service17
1 files changed, 17 insertions, 0 deletions
diff --git a/recipes-connectivity/hostapd-example/hostapd-example/aquila-am69/hostapd-example.service b/recipes-connectivity/hostapd-example/hostapd-example/aquila-am69/hostapd-example.service
new file mode 100644
index 00000000..d0d03491
--- /dev/null
+++ b/recipes-connectivity/hostapd-example/hostapd-example/aquila-am69/hostapd-example.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
+Requires=enable-wifi.service
+
+[Service]
+Type=forking
+PIDFile=/run/hostapd.pid
+# Create virtual interface uap0 used for access point and make wlan0 down
+ExecStartPre=@SBINDIR@/iw dev wlan0 interface add uap0 type __ap
+ExecStartPre=@SBINDIR@/ip link set wlan0 down
+ExecStart=@SBINDIR@/hostapd @SYSCONFDIR@/hostapd-tdx-demo-img.conf -P /run/hostapd.pid -B
+# Remove uap0 and bring wlan0 up after stopping
+ExecStopPost=@SBINDIR@/iw dev uap0 del
+ExecStopPost=@SBINDIR@/ip link set wlan0 up
+
+[Install]
+WantedBy=multi-user.target