PDA

View Full Version : Issue with auto restart. Giving +REP.


Kyle
18/03/2014, 06:06 PM
I get this error on my linux server for the SA-MP Auto restart script.

http://puu.sh/7AghB.png

This is the code:


USERNAME=adminfuture
SERVER_EXE=samp03svr

## Checking that there is $1
if [ ! $USERNAME ]
then
echo "USAGE: ./killserv.sh [USERNAME]"
echo "Warning: The server should be offline."
exit 1
fi

cd /home/$USERNAME/samp03/

PROCESSCOUNT=$(ps -fu $USERNAME | grep $SERVER_EXE | grep -v grep | wc -l)

case $PROCESSCOUNT in
0)
nohup ./$SERVER_EXE &
echo "Server started for user $USERNAME."
;;
*)
PROCESS_ID=$(pidof /home/$USERNAME/sa-mp/$SERVER_EXE)
echo A Server is already running for user $USERNAME.
echo You can use ./killserv $USERNAME in order to start the server.
;;
9999)
echo WARNING!! User $USERNAME has more than once process.
;;
esac


Thanks

MP2
18/03/2014, 07:32 PM
Nothing to do with PAWN or SA-MP.