« No weekly CCA login at this time? | Resnet's dismal customer service, a customer experience » |
I previously had provided a link to my CCA login Perl script here.
I had later added a link to a bash script to be runnable from cron. I have now updated this script, to allow the use of a tcp ping, and to provide logging.
The file can be run directly from crond, e.g., every couple of minutes, to check if the network connection is still available. The file checks if it can ping the UCI webserver, and if not, uses the login script to log in to the CCA system. To use the file, update the IP address, UCINetID and password.
Logging data is written to the file .resnet in the home directory.
Program usage:
$: cca -h Usage: cca [type] [logging] type: Ping type (0: ICMP Echo through ping, 1: TCP Ack through nmap). Default: 0. Option 1 requires nmap to be installed and in the path. Get nmap from http://www.insecure.org/ logging: 1 to log to .resnet in the home directory.