You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
710 B

  1. #!/bin/bash
  2. IPADDRESS=192.168.78.50
  3. CAMERAMODECTLOC=bay4hfs
  4. TMPFILE=bay4tmp
  5. TELNETSERVER=127.0.0.1
  6. PORT=6802
  7. MONITORNUMBER=12
  8. wget $IPADDRESS -O $CAMERAMODECTLOC && cat $CAMERAMODECTLOC | grep Temp > $TMPFILE
  9. RESULT=$(cat $TMPFILE)
  10. telnet $TELNETSERVER $PORT <<EOF
  11. $MONITORNUMBER|show||||$RESULT
  12. EOF
  13. #successful results will be viewable in INFO level syslogs (devuan):
  14. #Jan 19 04:15:01 server CRON[27503]: (root) CMD (/home/cam/scripts/telnet_bay4.sh)
  15. #Jan 19 04:15:01 server CRON[27504]: (root) CMD (/home/cam/scripts/telnet_dispatch.sh)
  16. #Jan 19 04:15:01 server zmtrigger[15315]: INF [Updated show text to 'Temp:59#015
  17. #Jan 19 04:15:01 server zmtrigger[15315]: INF [Updated show text to 'Temp:75#015