Any chance you can move the trigger for YazFi to be detected to the end of your script, after a Failover or Failback has completed?
Code:
# Trigger YazFi if installed
logger -p 6 -t "${0##*/}" "Debug - Checking if YazFi is installed"
if [ ! -z "$(cru l | grep -w "YazFi")" ] && [ -f "/jffs/scripts/YazFi" ] >/dev/null;then
logger -p 4 -st "${0##*/}" "Service Restart - Triggering YazFi to update"
sh /jffs/scripts/YazFi check &
fi
Ran the test twice, both failover and failback, and three times YazFi had to wait until it checked itself via its preset 10 minute Cron Job.
The fourth time on failback, I invoked the command only a couple of minutes after failback occured:
Code:
sh /jffs/scripts/YazFi check
and I got this response via YazFi:
Code:
YazFi firewall rules not detected during persistence check, re-applying rules
YazFi v4.4.2 starting up
wl0.1 has FORCEDNS enabled, setting DNS2 to match DNS1...
wl0.1 passed validation
wl0.2 passed validation
wl0.1 (SSID: XXXXXXX) - sending all interface internet traffic over WAN interface
wl0.2 (SSID: XXXXX) - sending all interface internet traffic over WAN interface
Forcing YazFi Guest WiFi clients to reauthenticate
YazFi v4.4.2 completed successfully
At this point, the wl0.2 IOT devices were connected and usable.
Otherwise all FailOver and Failback tests were successful for ISP01 and ISP02.