#!/bin/sh
PIDLOG="tdpsd.pid"
LOG="tdpsd.log"
RUNNING="no"

if [ -f $PIDLOG ]
then
	#ps -e -o pid | grep -q `cat $PIDLOG`  > /dev/null
	ps -p `cat $PIDLOG` > /dev/null
	if [ $? -eq 0 ]
	then
		RUNNING="yes"
	fi
fi

if [ $RUNNING = "yes" ]
then
	tail -f $LOG
else
	cat $LOG
	echo ""
	echo "The TeamDrive Personal Server is not running"
fi
