summaryrefslogtreecommitdiff
path: root/rerun.sh
blob: 5ba2e96736a997ee41485ddf0e4568638a46b2c6 (plain)
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" "$@"
}