the_antiroot Report post Posted May 4, 2006 Computers crash, systems reboot, and and life (or botisem) must go on, so I wsa a bit qurious as to how other bot owners handle this. I have a rather nice method I think, I use q2getty a nice little system written for those running dedicated quake II servers, though the author quickly realised that it could be used for much more. So basically on bootup my system fires off each of my bots in a virtual console and if it dies, restarts it after a short delay (to avoid login spamming in case of problems) the delay ispart of the shellscripts q2getty runs. Heres a excerpt from the my inittab that handles it. c1:12345:respawn:/sbin/agetty 38400 tty1 linux c2:12345:respawn:/sbin/agetty 38400 tty2 linux c3:2345:respawn:/sbin/q2getty tty3 bot /bin/sh /home/bot/guardbot/sigsegv c4:2345:respawn:/sbin/q2getty tty4 bot /bin/sh /home/bot/guardbot/kathkusa c5:2345:respawn:/sbin/q2getty tty5 bot /bin/sh /home/bot/guardbot/ghost c6:2345:respawn:/sbin/q2getty tty6 bot /bin/sh /home/bot/nera/nera which basically runs the appropriate scripts as user "bot" heres "/home/bot/guardbot/sigsegv" cd /home/bot/guardbot ./guardbot.bin -i cfgsigsegv.dat -m mapsigsegv.ini sleep 150 A solution I like, but im curios as to how others do it Share this post Link to post Share on other sites
Learner Report post Posted May 4, 2006 The Ant Server has some restart capability in it for starting some ants if too many get disconnected, but as a failsafe feature the program itself will NOT autostart. It has it's own pages for helping monitor and special protected commands I can send it for some actions or monitoring a specific Ant in detail. Share this post Link to post Share on other sites
The_Piper Report post Posted May 4, 2006 I start my bots using another program via shell(). If the bot itself crashes, this controller program sleeps a few seconds and restarts the bot then again. And i still plan to have a cron job to watch the controller and restart him after a reboot or such. Piper Share this post Link to post Share on other sites
Bharain Report post Posted May 4, 2006 (edited) For my quake3 server i used to use a boot script which calls a shell script which is basically a while loop with a sleep and a call to q3ded in there. Then it'll restart after reboots, crashes or /rcon quit EDIT: oh and screen in there somewhere for direct access. Edited May 4, 2006 by Bharain Share this post Link to post Share on other sites
dns_server Report post Posted May 5, 2006 algorn hosts iknow for me, i have ssh access and run the bot under screen. Screen makes manageing the bot easyer, you can disconnect from the session and reconnect it with screen -x. Haveing it running in a sonsole is also good because you can ctrl+c to kill it if everyhing stops working. Share this post Link to post Share on other sites
Torg Report post Posted May 5, 2006 I have my bots running manually (this will change as soon as I need to shutdown my dev box. :-P) I have restart or a kill option in them, which returns an error value. Because of this, I have them running in a wrapper script each which restarts the process until the kill error value is reached. In addition to this, I have the wrapper script's running in screen for monitoring/direct access. Share this post Link to post Share on other sites
Army1217 Report post Posted May 8, 2006 Are you people talking about your characters that gather cash for you(macroing)? Share this post Link to post Share on other sites
Learner Report post Posted May 8, 2006 Are you people talking about your characters that gather cash for you(macroing)? Thats illegal and we lock or ban the characters and thei main when they are caught. Share this post Link to post Share on other sites
The_Piper Report post Posted May 8, 2006 Are you people talking about your characters that gather cash for you(macroing)? No, we are talking about the accounts with a purple name, like the trade bots or the fun bots who play games with you. Piper Share this post Link to post Share on other sites
Aislinn Report post Posted May 8, 2006 Are you people talking about your characters that gather cash for you(macroing)? We have very strict bot rules: http://www.eternal-lands.com/forum/index.php?showtopic=15730 Share this post Link to post Share on other sites
scafativ Report post Posted May 19, 2006 Well, gossip has been 100% stable for 10 weeks she's been around, and she's running on a debian linux box that is perfectly stable, so at this point, she's started manually. She reconnects automatically if there's a server reboot or a blip in our bandwidth without the bot code or the box being "rebooted". I'd normally have a watchdog cron to restart a process like a bot, but gossip's been so stable that I think I'd prefer to diagnose before restarting her if (when?) she did crash. scafativ Share this post Link to post Share on other sites
WizzKidd Report post Posted May 31, 2006 Hmm, I have no automated way to start my bots, but I have not really needed it either. They dont seem to crash anymore (they did a little in the beginning). They do, however have a reboot command that players with certain rank can pm the bot with. This command causes the bot to close, open a new instance, and auto login. This is useful as guild members can reset them if they begin to act up. Share this post Link to post Share on other sites
dns_server Report post Posted June 1, 2006 I run 3 small scripts, the first starts the bot under screen, the second loops while a file exists. if the bot is to restart it creates a temporary file "restartme" if it is to just quit it does not create the file and just ends. The last one just runs the bot program startmeup: screen ./dorun dorun: touch restartme while [ -f restartme ] do rm restartme echo ----------- restarting ------------ ./run done run: java -cp pircbot.jar:mysql.jar:iknow.jar:. bot.deadface6.MyBot This has the advantage that it can be hosted somewhere else and i can ssh to the account and reconnect to the screen session with "screen -x" to monitor it and if everything stops working i can ctrl+c to break the bot. Share this post Link to post Share on other sites
Zep Report post Posted June 12, 2006 Ive been using a system similar to dns, In that they use screen, Normally because im not directly on the machine, and its easyer to analyse the indervidual bots output remotely. Basicly, to make sure they are always running, I use crontab'ed bash scripts. Share this post Link to post Share on other sites
LabRat Report post Posted June 12, 2006 elbot.bat: taskkill /IM elbot.exe taskkill /IM Pigeon taskkill /IM ApresMort if not exist "E:\Documents and Settings\Administrator\Desktop\elbot\elbot.exe" goto end del /y elbot.exe move "E:\Documents and Settings\Administrator\Desktop\elbot\elbot.exe" . :end start "Pigeon" /BELOWNORMAL /MIN elbot.exe -I elbotc1.exe.dat start "ApresMort" /BELOWNORMAL /MIN elbot.exe -I elbotc2.exe.dat Broken down: taskkill - close down the bot processes if already running if not exist.. check whether I have a recently compiled version, if not run the last version If I do have an existing version, delete the old one and move the new version to the bot install directory start - start the bots, window name "" belownormal priority, window minimised with the specific data file elbotc?.exe.dat Simple, straightforward and infinitely expandable. Share this post Link to post Share on other sites