unifios-utilities
unifios-utilities copied to clipboard
udm-boot.service unit file enhancement suggestion
Describe the bug
My combination of UDM-Pro + ISP (Bell Canada) does not work properly (no default route gets set, software issue reported to ubiquiti). I'm using udm-boot.service to work around the issue and run a script at boot. Unfortunately, most of the time udm-boot.service comes up for 'onshot' when the network is not fully up.
I made those changes to the unit file and it helps greatly:
# unifi-os shell
root@ubnt:/# diff -u0 /lib/systemd/system/udm-boot.service.orig /lib/systemd/system/udm-boot.service
--- /lib/systemd/system/udm-boot.service.orig 2021-05-25 04:53:48.000000000 -0400
+++ /lib/systemd/system/udm-boot.service 2023-01-23 08:51:37.557053934 -0500
@@ -7 +7,2 @@
-Type=oneshot
+Restart=on-failure
+RestartSec=5s
I am using version 1.0.5. Would you consider making those changes permanent? it will keep retrying the boot scripts until all of them return with 'exit 0'.
sure, send a PR and ill crank out a new version.
I have a similar issue, but with custom EBTables.sh script. UDM resets EBTables on boot, but it does it at different times in the boot sequence and custom EBTables.sh script sometimes ends up applying itself before UDM resets EBTables. I tried adding "Sleep 15" or "Sleep 45" at the beginning of the EBTables script, but result is always random...
try 2x 1.0.1 or .1.0.7