#!/bin/sh

dir=$HOME/.mongod

if [ -s $dir/hostname ]
then
    hostname=`cat $dir/hostname`
    if [ "$hostname" != "`hostname`" ]
    then
	echo Server is running on $hostname
	exit
    fi
fi

if [ -s $dir/var/mongod.lock ]
then
    kill `cat $dir/var/mongod.lock`
fi
