hlfw.ca

rc

ref: 5bde4c3a860a0708cbcf0c76cb136529c5f4c173
dir: /barrier/

View raw version
#!/bin/rc

fn sysnames {
	for(sys in `{ndb/query -a authdom 9front sys}){
		netscan $sys 24800 | grep -s open && echo $sys
	}
}

fn waitforconn {
	while(){
		sleep 1
		echo Connecting to $sysname...
		netstat | grep 24800 | grep -s Established && echo Ready && exit
	}
}

sysname=`{sysnames | fm -p}
if(~ $#sysname 0)
	exit
waitforconn &

tlsclient tcp!macky!24800 barrera