<commit_before>#!/bin/bash

#ISP_Checker.sh <trace address> <hops> <check> <mail address>
# Notes:
  #apt-get install -f mailutils
  #mail -s "Test Text" "<EMAIL>,<EMAIL>"

_directory=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
_mail="$4"
_check="$3"
_file="/tmp/ISP-Checker-$_check"
_result=$(traceroute $1 -m $2)

echo $_result
echo

if [[ "$_result" == *"* * *"* ]]; then
  echo "error!"
  exit
fi

if [[ ! "$_result" == *"$_check"* ]]; then
  echo "ISP-Down: $_check"
  if [ ! -f $_file ]; then
    touch $_file
    if [ -f $_directory/isp_down.sh ]; then
      $_directory/isp_down.sh
    fi
    if [-f $_directory/reboot_loadbalancer.sh ]; then
      $_directory/reboot_loadbalancer.sh <ip> <user> <pass>
    fi<commit_msg>Update isp_checker.sh<commit_after>#!/bin/bash

#ISP_Checker.sh <trace address> <hops> <check> <mail address>
# Notes:
  #apt-get install -f mailutils
  #mail -s "Test Text" "<EMAIL>,<EMAIL>"

_directory=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
_mail="$4"
_check="$3"
_file="/tmp/ISP-Checker-$_check"
_result=$(traceroute $1 -m $2)

echo $_result
echo

if [[ "$_result" == *"* * *"* ]]; then
  echo "error!"
  exit
fi

if [[ ! "$_result" == *"$_check"* ]]; then
  echo "ISP-Down: $_check"
  if [ ! -f $_file ]; then
    touch $_file
    if [ -f $_directory/isp_down.sh ]; then
      $_directory/isp_down.sh
    fi
    if [-f $_directory/loadbalancer.sh ]; then
      $_directory/loadbalancer.sh -r <ip> <user> <pass>
    fi
{'fraction_non_alphanumeric': 0.20449897750511248, 'fraction_numerical': 0.006816632583503749, 'mean_word_length': 3.516923076923077, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1028723', 'n_tokens_mistral': 584, 'n_tokens_neox': 571, 'n_words': 137}