Core Restarter Syntax Error?

09/07/2011 21:42 SuchtdiggA#1
Hallo ,ich wollte den Core restarter von AiiR7 benutzen hab alles angepasst (Daroo files) doch es kommt immer ein syntax error:

restarter.sh: 49: Syntax error: "fi" unexpected (expecting "then")

Kann vill irgend wer helfen?

Hier noch die shell:
HTML Code:
#!/bin/sh

GAMEDIR="/home/game"
LOG="$GAMEDIR/logs/corerestart.log"

PIDAUTH=`ps aux | grep auth | grep -v grep | awk '{print $2;}'`
if [ "x$PIDAUTH" != "x" ];
then
echo "`date +%d.%m.%Y-%H:%M:%S` :: AUTH SERVER IST OKAY! PID: $PIDAUTH" >> $LOG
else
echo "`date +%d.%m.%Y-%H:%M:%S` :: Der Auth (Login-Server) ist abgestürzt" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Starte Auth (Login-Server) ..." >> $LOG
cd $GAMEDIR/auth && ./auth
fi

PIDDB=`ps aux | grep db | grep -v grep | awk '{print $2;}'`
if [ "x$PIDDB" != "x" ];
then
echo "`date +%d.%m.%Y-%H:%M:%S` :: DB CORE IST OKAY! PID: $PIDDB" >> $LOG
else
echo "`date +%d.%m.%Y-%H:%M:%S`:: Der DB Core ist abgestürzt" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Starte DB Core & den rest des Servers ..." >> $LOG
cd $GAMEDIR/db && ./db
cd $GAMEDIR/auth && ./auth
cd $GAMEDIR/channel1/game && ./game

fi


PIDGAME1=`ps aux | grep game1_1 | grep -v grep | awk '{print $2;}'`
if [ "x$PIDGAME1" != "x" ];
then
echo "`date +%d.%m.%Y-%H:%M:%S` :: GAME1_1 CORE IST OKAY! PID: $PIDGAME1" >> $LOG
else
echo "`date +%d.%m.%Y-%H:%M:%S` :: Der GAME1_1 Core ist abgestürzt" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Starte GAME1_1 Core ..." >> $LOG
cd $GAMEDIR/channel1/game && ./game

fi

PIDGAME99=`ps aux | grep game99 | grep -v grep | awk '{print $2;}'`
if [ "x$PIDGAME99" != "x" ];
then
echo "`date +%d.%m.%Y-%H:%M:%S`::  GAME99 CORE IST OKAY! PID: $PIDGAME99" >> $LOG
else
echo "`date +%d.%m.%Y-%H:%M:%S` :: Der Game99 Core ist abgestürzt" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Starte Game99 Core ..." >> $LOG
cd $GAMEDIR/game99 && ./game99

fi