Hurricane Electric's IPv6 Tunnel Broker Forums

Advanced search  

News:

Welcome to Hurricane Electric's Tunnelbroker.net forums!

Author Topic: Daily Test Bash Script  (Read 2423 times)

bmlandis2010

  • Newbie
  • *
  • Posts: 1
    • View Profile
Daily Test Bash Script
« on: November 13, 2014, 10:34:56 PM »

After trying several different scripts on the forum and other websites, I decided to adapt my own script for the daily tests. I used code from several different locations (links in the script).

Features:
  • Chooses a random domain from a list for each test
  • Checks for required files
  • Checks for required programs
  • Verifies that the logon to the website was successful
  • Logs the results of each test with timestamps
  • If a test fails, it will run it again with a different domain up to 5 times (this value is changeable)
  • If the domain list file for one test is missing or empty, that test will be skipped and the others will still run
This script is setup to run every 24 hours + 1 minute. The tar file contains the script and the domain list files with over 2000 IPv6 entries
If you have any questions, comments, or suggestions, please let me know.
https://www.dropbox.com/s/nb3e8seesaec1mx/henet.tar.gz?dl=1
Logged

ccdirt

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Daily Test Bash Script
« Reply #1 on: December 07, 2014, 12:41:37 PM »

It's "almost" like cheatin'. Thanks! :)
Logged

G1IUL

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Daily Test Bash Script
« Reply #2 on: June 18, 2015, 08:08:15 AM »

Sorry for the Bump
Thanks for this script.  Although I seem to have one problem with it.  When it runs it seems to clear out the traceroute6-in file and then errors with "Error opening file "traceroute6-in" or file does not exist" and when I do an ls -l i see the file is 0 length.   I have tried copying the digaaa-in file to traceroute-in but when I run the script I get the same error and the file is back to 0 length.  I have even added an entry to the file for one of my own machines that traceroute6 completes on with no problem but the same thing happens.

Any idea whats up ?
Logged

tlhackque

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Daily Test Bash Script
« Reply #3 on: June 09, 2017, 09:57:46 AM »

I made some changes:
  • It runs under cron instead of keeping a process lying around forever.
  • It automatically picks a random time to run at install, then every 25 hours.  Even across reboots.
  • Fixed a bug caused by a change in the error messages from HE.
  • Use readlink instead of realpath, as it's more common - at least in my environments
  • Keeps the last 24 log files
  • Added INSTALL instructions
No guarantees ("it works for me"), but apply the attached patch & enjoy.

N.B. I strongly suggest running in a dedicated directory.  Also, the patch creates several new files.
Logged

agentb

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Daily Test Bash Script
« Reply #4 on: June 17, 2017, 09:09:17 PM »

I made some changes:
  • It runs under cron instead of keeping a process lying around forever.
  • It automatically picks a random time to run at install, then every 25 hours.  Even across reboots.
  • Fixed a bug caused by a change in the error messages from HE.
  • Use readlink instead of realpath, as it's more common - at least in my environments
  • Keeps the last 24 log files
  • Added INSTALL instructions
No guarantees ("it works for me"), but apply the attached patch & enjoy.

N.B. I strongly suggest running in a dedicated directory.  Also, the patch creates several new files.

That is exactly what I was after however we're having difficulty applying the patch. Mind uploading everything to a repo for all to enjoy? Would be much appreciated :)
Logged