MF-Bra
Occasional Visitor
Please would you post your script with some basic instructions as that would be fantastic for a noob like me.
PS: I have come over from FreshTomato on a RT-N18U to a RT-AX88U currently on stock. Once Merlin 386 is out of beta, I am going to flash.
I'll try to provide all the steps the best i can, it was a collection from several posts i read over time... Please I ask the seniors here to comment and suggest better ways to implement it...
(i'm assuming you can ssh to your "merlin" device )
If you are running on a node like me, you need to make sure it will run scripts upon start-up so you need first to do this
Bash:
nvram set jffs2_exec=/jffs/scripts/services-start
nvram set jffs2_scripts=1
nvram commit
then create the file by doing
Bash:
vi /jffs/scripts/services-start
Bash:
#!/bin/sh
cru a temp "*/10 * * * * /jffs/scripts/<filename>.sh >/dev/null 2>&1"
don't forget to
Bash:
chmod +x /jffs/scripts/<filename>.sh
My script for RT-AC68u is this
Bash:
vi /jffs/scripts/<filename>.sh
Bash:
#!/bin/sh
Temp_CPU=$(cat /proc/dmu/temperature | grep -o '[0-9]\+' )
Temp_24g=$(wl -i eth1 phy_tempsense | tr -d -c 0-9 | awk '{print subst r($1,1,2)}')
Temp_5g=$(wl -i eth2 phy_tempsense | tr -d -c 0-9 | awk '{print subst r($1,1,2)}')
logger -t "custom_script" "Temperatures CPU $Temp_CPU - 5g $Temp_5g - 2.4g $Temp_24g"
My script for RT-AC86u is this { the way to get temperature is different) :
Bash:
#!/bin/sh
Temp_CPU=$(cat /proc/dmu/temperature | grep -o '[0-9]\+' )
Temp_24g=$(wl -i eth1 phy_tempsense | tr -d -c 0-9 | awk '{print subst r($1,1,2)}' )
Temp_5g=$(wl -i eth2 phy_tempsense | tr -d -c 0-9 | awk '{print subst r($1,1,2)}' )
logger -t "custom_script" "Temperatures CPU $Temp_CPU - 5g $Temp_5g - 2.4g $Temp_24g"
I also do another wgets to post the results for my home automation, but it's not the case here...
[EDIT] Sorry, but for some reason the command "s u b s t r" always presented one error here to post, so i put one space on the code above, please remove it when you implement in your router.
Last edited: