This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

ISP goes down bots dont rejoin when its back up

Old posts that have not been replied to for several years.
M
MrMike19597
Voice
Posts: 30
Joined: Thu Jul 07, 2005 9:39 pm

ISP goes down bots dont rejoin when its back up

Post by MrMike19597 »

i have 3 bots running, the ISP went down for 10 mins this morning for maintenance i was watching to see if the bots would come back to the channels they are supposed to be sitting in but they didnt is there anything i was supposed to change or add? Mike
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

set up a cronjob
M
MrMike19597
Voice
Posts: 30
Joined: Thu Jul 07, 2005 9:39 pm

Post by MrMike19597 »

i heard about that crontab program but not sure if i was using the right one or not since im using Winblows and it didnt want to do what i was asking it, any suggestions?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

just the usual suggestion, RTFM
M
MrMike19597
Voice
Posts: 30
Joined: Thu Jul 07, 2005 9:39 pm

Post by MrMike19597 »

ahh i see, so now i can just add this autobcheck to my cron correct? (after i edit it of course)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Editing the botchk file

The botchk script and crontab are used to automatically restart the bot if the shell it's on reboots or if the bot process is killed for some other reason. You can find the botchk file in the scripts directory (in the directory you installed the bot to). Newer versions of Eggdrop (from 1.3.24i) have a script included that automatically configures botchk and crontab for you. In telnet, simply switch to the scripts directory and type chmod 700 autobotchk then ./autobotchk <config> -dir /home/botdir -noemail, where /home/botdir is the directory you installed the bot to and <config> is the name you chose for your config file.

Otherwise, you can edit the botchk file and insert the required crontab entry manually. There are only four things you need to set in the botchk file, all of which are pretty self explanatory. Once you've edited the botchk file, you need to add an entry to your crontab. Here's the best method:

1) Your crontab line should look like:

0,10,20,30,40,50 * * * * /home/botdir/scripts/botchk >/dev/null 2>&1

This will run the botchk script every 10 minutes, which checks that the bot is running and restarts it if it isn't. You just need to change the /home/botdir part to the correct path to the bot on your shell (type pwd to show this). Type the line in Notepad or some place where you can highlight and copy it from.

2) Type crontab -e. This should bring up the vi editor (it will appear as a bunch of lines starting with the ~ character), but may open up the pico editor instead.

3) For vi, do the following - hit ctrl-L, hit i, paste the crontab line you created earlier, hit Esc, type :wq! then hit Enter (if you make a mistake doing this, just hit Esc and start over). For pico - paste the crontab line you created earlier, hit ctrl-X, hit Y when prompted to save, hit Enter when prompted for a filename.

You can view your current crontab entries by typing crontab -l. To clear your crontab, use crontab -r (may be crontab -d on some shells).
you have a problem with following that? if so, what exactly is that you don't understand?
M
MrMike19597
Voice
Posts: 30
Joined: Thu Jul 07, 2005 9:39 pm

Post by MrMike19597 »

i understand all that, im just making sure i put it in my cron for windows since i am on windows
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

the bots reside on your Windows computer at home?
M
MrMike19597
Voice
Posts: 30
Joined: Thu Jul 07, 2005 9:39 pm

Post by MrMike19597 »

yes they do, thats what im trying to say lol
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

then the problem has nothing to do with crontab

make sure your bots don't bind to a specific IP, which is most likely periodically & forcefully changed by your ISP (dynamic IP)
M
MrMike19597
Voice
Posts: 30
Joined: Thu Jul 07, 2005 9:39 pm

Post by MrMike19597 »

i have static ip though so my IP dont change
M
MrMike19597
Voice
Posts: 30
Joined: Thu Jul 07, 2005 9:39 pm

Post by MrMike19597 »

Should i bind it to my IP since i have static? or no?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

paste +srvd console log of failing connect attempts, also the output of .dccstat and ipconfig (the latter is network utility you need to run from DOS command prompt)
M
MrMike19597
Voice
Posts: 30
Joined: Thu Jul 07, 2005 9:39 pm

Post by MrMike19597 »

They dont have any failed connect attmepts, they connect to the server fine, but when the isp goes down i have to restart them in order for them to go to the channel basically they sit on the server and dont join the room until a restart is issued
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

nevertheless, paste +srvd console log and the output of .status all
Locked