Changeset 19400


Ignore:
Timestamp:
Nov 15, 2018, 1:25:14 PM (9 months ago)
Author:
dorner
Message:
changed from lynx to links to deal with non-valid certificates
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Monitoring/CheckSwiftSchedule.sh

    r18704 r19400  
    66
    77# list of sources
    8 sources=( "Mrk 421" "Mkn 421" "Mkn421" \
     8sources=( "MRK 421" "Mrk 421" "Mkn 421" "Mkn421" \
    99          "1959" "V404" \
    1010          "1H 0323+342" "RXJ0324.6+3410" "RGBJ0324+3410" "SWIFTJ0325.3-5916"
     
    6060   #   for the date of sunset
    6161   printprocesslog "INFO Checking "$date2
    62    lynx -width 200 -nolist -dump http://www.swift.psu.edu/operations/obsSchedule.php?d=$date2 | grep $date2 >> $schedulefile
     62   #lynx -width 200 -nolist -dump https://www.swift.psu.edu/operations/obsSchedule.php?d=$date2 | grep $date2 >> $schedulefile
     63   links -width 300 -ssl.certificates 0 -dump https://www.swift.psu.edu/operations/obsSchedule.php?d=$date2 | grep $date2 >> $schedulefile
    6364   #   for the date of sunrise
    6465   nextday=`date +%Y-%m-%d --date=$date2"+24hour"`
    6566   printprocesslog "INFO Checking "$nextday
    66    lynx -width 200 -nolist -dump http://www.swift.psu.edu/operations/obsSchedule.php?d=$nextday | grep $nextday >> $schedulefile
     67   #lynx -width 200 -nolist -dump https://www.swift.psu.edu/operations/obsSchedule.php?d=$nextday | grep $nextday >> $schedulefile
     68   links -width 300 -ssl.certificates 0 -dump https://www.swift.psu.edu/operations/obsSchedule.php?d=$nextday | grep $nextday >> $schedulefile
    6769
    6870   # check if schedule is empty
     
    7577   
    7678   # grep only the columns which are needed
    77    cat $schedulefile | sed -r -e 's/[0-9]{5,6}[\ ]{1,4}[0-9]{1,3}[\ ]{1,6}//' | grep -o -E '^[\ ]{1,20}20[1-9][0-9]-[01][0-9]-[0-3][0-9]\ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\ \ \ 20[1-9][0-9]-[01][0-9]-[0-3][0-9]\ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\ \ \ [A-Z1-4]([A-Za-z0-9][\ \.\+\-]?){3,20}' > $schedulefile2
     79   #cat $schedulefile | sed -r -e 's/[0-9]{5,6}[\ ]{1,4}[0-9]{1,3}[\ ]{1,6}//' | grep -o -E '^[\ ]{1,20}20[1-9][0-9]-[01][0-9]-[0-3][0-9]\ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\ \ \ 20[1-9][0-9]-[01][0-9]-[0-3][0-9]\ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\ \ \ [A-Z1-4]([A-Za-z0-9][\ \.\+\-]?){3,20}' > $schedulefile2
     80   cat $schedulefile | awk '{ print $1" "$2" "$3" "$4" "$7" "$8" "$9}' | sed -r -e 's/[-]?[0-9]{1,3}[.][0-9]{5}$//' | sed -r -e 's/[-]?[0-9]{1,3}[.][0-9]{5}\ $//' > $schedulefile2
    7881   
    7982   # output list of sources
Note: See TracChangeset for help on using the changeset viewer.