netstart/
#!/bin/sh

# if bin/coldcc and bin/genesis aren't executable
if [ ! -x bin/coldcc -o ! -x bin/genesis ]; then
	echo "Looks like you need to set up the symlinks in the bin directory to"
	echo " genesis and coldcc.  See the README file for more info."
	exit
fi

# if pidfile exists
if [ -r logs/genesis.run ]; then
	# server already running
	kill `cat logs/genesis.run 2>/dev/null` >/dev/null 2>/dev/null
fi

# compile, start server, echo message
bin/coldcc -c -t netstart -W && bin/genesis && echo "Successfully started, default port is 4249."