Someone have a script to open up World (gs01) automatically after falls?
like open up the world after falls in five minutes?
thanks
Someone have a script to open up World (gs01) automatically after falls?
like open up the world after falls in five minutes?
thanks
This has been posted somewhere. If I run across it again I will link to it, but if you want it a little quicker you may desire to search for it yourself![]()
i Found
/root/daemon-gs01.sh
Code:
# - - - - - - BEGIN
# Sample Daemon Guard for World Map
#/bin/bash
if ps ax | grep -v grep | grep 'gs gs01' > /PWServer/logs >> daemon-gs01.log
then
echo "Main World [GS01] is RUNNING."
else
echo "Main World [GS01] is DOWN!!! Attempting to restart GS01..."
echo "Starting GS01..."
cd /PWServer/gamed
./gs gs01
fi
# - - - - - - END
/etc/crontab
Code:
10 * * * * /root/daemon-gs01.sh
but... in my host not have the folder crontab in /etc
and now?
crontab is not a directory it is a file
no comments... fail for me.... thanks a lot.
i don't believe this...
you start the gs in a loop and it will auto restart once it quits
Last edited by dokz; 06-02-12 at 08:11 AM.
Yes it can be added in start.sh if you want it too ne
Alternatively use my advanced instance loader which will do that for you amongst other useful stuff (like keep log if it crashes, avoid hogging the server if it crashes on reload, etc).
I've even updated it with my latest changes :D
I use the following
Create the file start_map_gs01.sh
echo "Start gs01"
cd /PWServer/gamed
./gs gs01 >$
echo "gs01 started"
Add in crontab
crontab -e
0,10,20,30,40,50 * * * * /PWServer/start_map_gs01.sh
every 10 minutes will be sent the command to turn on the map.![]()
You wouldn't want to keep starting it over and over though if it hasn't 'failed' ...