# Drop-in: /etc/systemd/system/hostapd.service.d/restart.conf # # The AP wlan (rtw89, USB) shares a USB hub with the Starlink ethernet (r8152, USB). # When Starlink flaps, the hub re-enumerates and the Wi-Fi radio is torn down with it: # hostapd's interface vanishes ("No such device") and it exits. Two stock defaults then # leave the AP dark until someone intervenes — this drop-in closes both: # # 1. Restart=on-failure ignores a *clean* exit, but hostapd exits 0 in some of these # cases. Restart=always covers every exit. # 2. The default start limit (5 starts / 10s) is exhausted by a re-enumeration storm, # after which systemd gives up permanently. StartLimitIntervalSec=0 disables the # limit so hostapd keeps retrying until the interface comes back. [Unit] StartLimitIntervalSec=0 [Service] Restart=always # A few seconds' backoff so the USB device has a chance to re-enumerate before we retry # (retrying instantly just fails on "No such device" and spins). RestartSec=5