I have an Asus router (RT-AC51U) and I would like to make a script to send some information from the router through serial. I've already programmed this script and it is running as wanted. After changing the mode of the file to being executable, I would like to run it on each startup after rebooting the router.
How I can do it?
my shell script is :
#!/bin/sh
for i in 1 2 3 4 5 6 7 8 9 10
do
my_RX=`cat /sys/class/net/vlan2/statistics/rx_bytes`
my_TX=`cat /sys/class/net/vlan2/statistics/tx_bytes`
echo "data*"$my_RX"*"$my_TX"*" > /dev/ttyS1
sleep 2s
done
where The firmware of the router is 30043808497 this firmware is NOT DD-WRT version