Hi all..
My problem - I am used this script kontrola.sh for restart crashing proces but problem..
problem..
I check several discussions, but no information did not help, move, "then" or "fi" did not work, the system is FreeBSD 8.2 64bit
help please
or I would anyone written a similar script for python ?
sorry for my english.. and thanks all
My problem - I am used this script kontrola.sh for restart crashing proces but problem..
Code:
#!/bin/sh
GAMEDIR="/home/game"
LOG="$GAMEDIR/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 je ok! PID: $PIDAUTH" >> $LOG
else
echo "`date +%d.%m.%Y-%H:%M:%S` :: AUTH CORE spadlo" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Startuji AUTH ..." >> $LOG
cd $GAMEDIR/auth && ./auth &
fi
problem..
Code:
: not found
: not found
kontrola.sh: 15: Syntax error: "fi" unexpected (expecting "then")
I check several discussions, but no information did not help, move, "then" or "fi" did not work, the system is FreeBSD 8.2 64bit
help please
or I would anyone written a similar script for python ?
sorry for my english.. and thanks all