You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-10Lines changed: 29 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -199,11 +199,29 @@ Now we can go ahead and enable the service.
199
199
200
200
Try restarting your Unifi gateway if you wish, and it should automatically authenticate!
201
201
202
-
If WAN doesn't come back up after a restart, it may be that wpa_supplicant is starting too soon. In that case, adding a 10s "sleep" has helped for some. Note: 10s has been tested successfully on a UDM Pro. If you have other hardware and WAN does not come back up, I suggest you incrementally increase from 10s until a restart results in your WAN connection coming back up successfully.
202
+
### Add failure tolerance to wpa_supplicant
203
+
If WAN doesn't come back up after a restart, it may be that wpa_supplicant is starting too soon. Regardless, we can configure a retry for the wpa_supplicant service.
> vi /etc/systemd/system/wpa_supplicant-wired@.service.d/restart-on-failure.conf
207
+
```
208
+
209
+
```ini
210
+
[Unit]
211
+
# Allow up to 10 attempts within a 3 minute window
212
+
StartLimitIntervalSec=3min
213
+
StartLimitBurst=10
214
+
215
+
[Service]
216
+
# Enable restarting on failure
217
+
Restart=on-failure
218
+
# Wait 10 seconds between restart attempts
219
+
RestartSec=10s
205
220
```
206
221
222
+
This `.conf` file specifying the retries will tie in to the wpa_supplicant-wired services, regardless of the eth number port.
223
+
224
+
207
225
## Survive firmware updates
208
226
Firmware updates will nuke the packages installed through `apt` that don't come with the stock Unifi OS, removing our `wpasupplicant` package and service. Since we'll no longer have internet without wpa_supplicant authenticating us with ATT, we can't reinstall it from the debian repos.
209
227
@@ -238,24 +256,23 @@ Description=Reinstall and start/enable wpa_supplicant
# If you needed to add a sleep to your wpa_supplicant service startup to successfully restore your WAN connection on restart, uncomment the following line (and update "sleep 10" to "sleep <whatever_timing_worked_for_you>") to persist that setting
0 commit comments