This Aseco flavor by Mistral contains a comprehensive rank system that orders stats by environment, track and author name. It also contains a built-in lottery system.
Moderators: Mistral, TM-Patrol
-
Furious-Py
- highway camper

- Posts: 2
- Joined: 31 May 2009 05:47
- Owned TM-games: Nations
Post
by Furious-Py » 31 May 2009 05:50
Hi, my Aseco.sh is shuting down some times, i think there are some errors, whatever it runs really great (when it does)
Is there some script to auto restart the php script when it goes down ?? i try some script but isnt working...
Code: Select all
#!/bin/bash
cd /var/www/trackmania/aseco/
err=1
until [ $err == 0 ];
do
[ -f restart.log ] && mv restart.log "log/`date +%Y-%m-%d_%H-%M-%S`_restart.log"
./Aseco.sh > restart.log 2>&1
err=$?
sleep 10;
done
-
Mistral
- Pit Crew

- Posts: 1304
- Joined: 02 May 2006 15:13
- Owned TM-games: tmuf
-
Contact:
Post
by Mistral » 31 May 2009 07:11
For this i have running a similar watchdog - you just have to adjust the path to aseco.log and the startup commands.
It restarts both ... server and script
Code: Select all
while true; do
run=`ps -ef | grep -v grep | grep -c TrackmaniaServer`
if [ $run -eq 0 ] ; then
tail ~/trackmania/tmu/aseco/aseco.log | awk '{print $0}' >> ~/crash.log
echo ------------------------------- CRASH ---------------------------- >> ~/crash.log
mistraltmu start
echo `date` - TMU SERVER restarted >> ~/restart.log
fi
run=`ps -ef | grep -v grep | grep -c aseco.php`
if [ $run -eq 0 ] ; then
tail ~/trackmania/tmu/aseco/aseco.log | awk '{print $0}' >> ~/crash.log
echo ------------------------------- CRASH ---------------------------- >> ~/crash.log
mistraltmuaseco start
echo `date` - TMU ASECO restarted >> ~/restart.log
fi
sleep 30
done