GL-MT1300 LED control instructions

For anyone who is interested in a solution for breathing led on vpn and a solid one when on normal wan. Just made a clean but dirty solution that works for me.

Please be aware that I probably broke a lot of things I’m apparantly not using, but it works for me.
For the ones that are feeling comfortable deeper into the system, It will not break mwan3, as I altered this for my needs and I use it extensively.

I deleted the content of the file /usr/bin/mt1300_led_deamon (or you rename the original for backup)

past the content below to the file and save it as /usr/bin/mt1300_led_deamon

#!/bin/sh
ip="1.1.1.1"   # use any dns you want
count="1"
timeout="1"
mt1300_led off
mt1300_led blue_breath daemon

while true; do

status=$(ping -q -c "$count" -W "$timeout" "$ip"  > /dev/null 2>&1 && echo "ok" || echo "fail")

if [ "$status" = "ok" ]; then
	if [ -d /sys/class/net/tun* ]; then    
		mt1300_led white_breath daemon   
	else    
		mt1300_led white daemon      
	fi
else
	mt1300_led blue_breath daemon
fi

sleep 10

done

Then restart the daemon with;

/etc/init.d/led restart

You can use any dns you want offcourse, default used by most is the dns from google 8.8.8.8, but I don’t us any Google or Facebook application or services. So I ban them from all my systems.

"FYI there are a lot of 8.8.8.8 and 8.8.4.4 in the firmware from Gl.Inet. This should be a choise not hardcoded. Just my 50 cents."

For I forget, make the file executable if you upload a new file instead of editing the original one.

chmod u+x filename