Quote:
Originally Posted by PsychoChihuahua
Show me an "ls -l Start*" from the dir where you put the start scripts, and then show me the Stop script, from where OWNER is defined through the end of the "for PROC in" loop.
|
-rwxr-xr-x 1 tld-are gameservers 6192 Jul 23 13:30 Start-tld1ut2004.sh
and
OWNER=tld-are
#
# Kill the 'Start' script first so it doesn't respawn the game.
#
for PROC in Start-tld1ut2004.sh ucc-bin
do
PID=`${PGREP} -x -u ${OWNER} ${PROC} > /dev/null 2>&1`
if [ $? -eq 0 ]; then
#
# timestamp
#
TIMESTAMP=`${DATE} +%m%d%y-%T`
echo "stopping ${PROC}"
${PKILL} -15 -x -u ${OWNER} ${PROC}
echo "stopped ${PROC} - ${TIMESTAMP}" >> ${LOG}
else
echo "${PROC}: not currently running"
fi
done
results
Output from cd /home/gameservers ; ./Stop-tld1ut2004.sh ..
Start-tld1ut2004.sh: not currently running
stopping ucc-bin