#!/bin/csh

#Test to see if the cm restart_server is working
source ../cmt/setup.csh
source ${CMROOT}/mgr/CmConfig.sh ${CMROOT} CascinaVCS

#Test cm restart_server -> check to see if the PID is different after the restart_server

set ps_cmserver_1=`ps -ef | grep NameServer.exe | head -1 | awk '{print $2}'`

cm restart_server

set ps_cmserver_2=` ps -ef | grep NameServer.exe | head -1 | awk '{print $2}'`

if ($ps_cmserver_1 == $ps_cmserver_2) then
	echo "PIDs are the same, command not working"
endif

exit 0

