#!/bin/sh
#
# Shutdown the empire server "emp_tm" cleanly.
# This should be run prior to shutting the system down
# to avoid leaving the AF_UNIX socket in the filesystem.
#
pid=`ps -ax | grep emp_tm | grep -v grep | awk '{print $1}'`
if [ "$pid" != "" ]; then
	echo Killing $pid
	kill $pid
else
	echo No empire server running
fi
