1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/env bash { socat -L'lock' 'UNIX-LISTEN:./s2s' 'OPENSSL:irc.andrewyu.org:7005' & start=`date -u +%s` ./haxserv uptime=$((`date -u +%s` - $start)) if (($uptime < 10)); then sleep $((10 - $uptime)) fi exec "$0" "$@" }