KKrcon should be in ports =)

escapedturkey at escapedturkey.com escapedturkey at escapedturkey.com
Sun Nov 9 08:39:43 PST 2003

It's a great utility for game hosts like myself, who run game servers. I
use it all the time for scripts.


To get it working properly, the following files must be placed in the
following locations:



I use the following script, for example, checks server status every 10

    kkrcon.pl -a instertserverip -p insertserverport -t old
insertrconpassword status > $tf1

    # total number of lines in output
    tnl=`wc $tf1 | awk '{print $1}' `

    # tnl=1 - server doesnt respond. crash/wrong ip/port
    # tnl=2 - bad password
    # tnl=5 - server empty

    if [ "$tnl" -le 1 ]; then
		sleep 30
	# lets try again, in case server was restarting map
	kkrcon.pl -a insertserverip -p insertserverport -t old insertrconpassword
status > $tf1
	tnl=`wc $tf1 | awk '{print $1}' `

	if [ "$tnl" -le 1 ]; then
	# no. server is really down
	serverpid=`ps auxw | grep serverstartfilenamehere | grep -v grep | awk
'{print $2}'`

	if [ -z "$serverpid" ]; then
	cd ~/serverstartupfolderhere


	kill $serverpid
		sleep 10
	cd ~/serverstartupfolderhere


More information about the freebsd-ports mailing list