For some unknown reasons, the ipv6 got offline once in a while. After rebooting, it turned just fine. I need ipv6 to do torrenting. So here comes the demand for a script to check my ipv6 availability.
1 | #!/bin/sh |
What it does is obvious. Noted that logger -t
needs two strings to display information in the log area. The script above displays information as follows.
1 | Oct 21 17:40:00 [ipv6]: check BEGIN |
However, the log area could be filled with these two information, which is not ideal. logger -t
sentence could be deleted after testing.
#Settings
Check
Advanced settings
-System settings
-Services
-Enable SSH
. SSH might not work properly on windows due to some reason about porting. Open the corresponding ports on windows should be the solution here.1
ssh admin@192.168.123.1
Change directory to
/etc/storage/
. Files in other directories will be deleted after rebooting. We don't want our script to vanish, of course.vi ipv6_check.sh
. Create a .sh script, and save the code above inside. The operations of vi is somewhat different from how we operate on windows.The script is not written into the ROM if you did not run the mtd_storage script, because of some settings of Padavan firmware.
run/sbin/mtd_storage.sh save
to save the modification.Run script regularly.
system settings
-Services
-cron
Input*/10 * * * * /etc/storage/ipv6_check.sh
in the Cron tab to run the script every 10 minutes.