*** anondate-tester.dst	2015-10-21 00:00:00.000000000 +0000
--- anondate-tester	2020-12-20 22:02:49.000000000 +0000
***************
*** 1,8 ****
--- 1,9 ----
  #!/bin/bash
  
  export TOR_LOG="/var/log/tor/log"
+ export TOR_DIR=/var/lib/tor/data
  
  cmd_item_list=(
  "--has-consensus"
  "--current-time-in-valid-range"
  "--show-valid-after"
***************
*** 11,22 ****
  "--tor-cert-lifetime-invalid"
  "--tor-cert-valid-after"
  )
  
  for cmd_item in ${cmd_item_list[@]} ; do
!    echo "cmd_item: /usr/local/lib64/helper-scripts/anondate $cmd_item $@"
!    output="$(/usr/local/lib64/helper-scripts/anondate $cmd_item $@)"
     exit_code="$?"
!    echo "output: $output"
!    echo "exit_code: $exit_code"
!    echo "----------"
  done
--- 12,27 ----
  "--tor-cert-lifetime-invalid"
  "--tor-cert-valid-after"
  )
  
  for cmd_item in ${cmd_item_list[@]} ; do
!    output="$(/usr/local/lib64/helper-scripts/anondate $cmd_item $@)"
     exit_code="$?"
!    if [ $exit_code -eq 0 ] ; then
!        echo "INFO: /usr/local/lib64/helper-scripts/anondate $cmd_item $@"
!        echo "output: $output"
!     else
!        echo "WARN: /usr/local/lib64/helper-scripts/anondate $cmd_item $@"
!        echo -n "exit_code: $exit_code " 
!        echo "output: $output"
!       fi
  done
