#!/bin/sh # # Health check of an node, used for getting an diagnostics output. # # Rick van der Zwet - OK=0 FAILED=1 echo "XXX: This is HIGHLY ALPHA, ask Rick before using it" iface_unused() { IFACE= ifconfig -l | tr ' ' '\n' | grep -q || return ifconfig | grep -q 'status: no carrier' && return return } for IFACE in vr1 vr2 ue0 ue1; do if iface_unused ; then continue fi echo "Finding NanoStation on Interlink Interface ()" /tools/find-nanostation done exit 1 echo "Direct Internet Access Check" fetch -d -v -o/dev/null http://ams-ix.net echo "Proxy Internet Access Check" env HTTP_PROXY=172.31.255.1:3128 fetch -v -o/dev/null http://ams-ix.net