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.

can this be done ?

Old posts that have not been replied to for several years.
User avatar
cambodia
Halfop
Posts: 73
Joined: Sun Aug 22, 2004 1:03 am
Location: cambodia

can this be done ?

Post by cambodia »

i have problem with my bot , and my request is i wanna get script that work with cronjob

the process is script ( cronjob ) will kill specify bot ( i have 4 bot and just want kill two of them ) every 1 hours ( or can set it to 2 or 3 hours as change ) after that bring the bot back

any advise ?
thank for reply :)
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Code: Select all

bind time - "0 *" dieproc

proc dieproc { } {
        die "Bot restarting"
}
 
This should kill your bot every 60 mins. It will not however restart your bot. Make sure you have setup autobotchk thats located in your scripts directory to make the shell restart your bot.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
cambodia
Halfop
Posts: 73
Joined: Sun Aug 22, 2004 1:03 am
Location: cambodia

Post by cambodia »

i still confuse when reading autobotchk can you give me full command of bring it back in botchk :) sorry if bother you about this i'm newbies about this :) :roll:
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

User avatar
cambodia
Halfop
Posts: 73
Joined: Sun Aug 22, 2004 1:03 am
Location: cambodia

Post by cambodia »

i readed whole night but still confuse and can't start it

last time it wil kill and bring my bot every hours ( setup by shell provider )

but after server got ddos now even he use same option before it still not kill my bot
now he test to kill all my bot and bring it back
when i wanna start i just do cd eggdrop then ./funk ( that it locate in my eggdrop folder )
Here is content of that funk file

Code: Select all

#!/bin/sh

killall -9 -u peter -m eggdrop-1.6.15
cd /home/peter/eggdrop
/home/peter/eggdrop/eggdrop /home/peter/eggdrop/eggdrop.conf
/home/peter/eggdrop/eggdrop /home/peter/eggdrop/khmer-webnet.conf
/home/peter/eggdrop/eggdrop /home/peter/eggdrop/theavy.conf
/home/peter/eggdrop/eggdrop /home/peter/eggdrop/kguard.conf

and when i do crontab -l in my shell it show

Code: Select all

*/59 * * * * * /home/peter/eggdrop/funk >/dev/null 2>&1 
REQUEST : i just want it kill eggdrop.conf & khmer-webnet.conf every 1 hours and bring it back online thta's only easy one that i can't do it but i know some of you in here can do it :D

cheers
peter
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Put that script I wrote on the bots that you want to kill every hour.
Then goto your shells eggdrop script directory and type this.

Code: Select all

./autobotchk eggdrop.conf -5 -noemail
Replace the word eggdrop.conf with the config you want to restart.

That will check every 5 minutes to see if your bot is dead or not and restart it if it is dead. 5 minutes is the lowest setting you can have if I remember correctly.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
cambodia
Halfop
Posts: 73
Joined: Sun Aug 22, 2004 1:03 am
Location: cambodia

Post by cambodia »

^DooM^ wrote:Put that script I wrote on the bots that you want to kill every hour.
Then goto your shells eggdrop script directory and type this.

Code: Select all

./autobotchk eggdrop.conf -5 -noemail
Replace the word eggdrop.conf with the config you want to restart.

That will check every 5 minutes to see if your bot is dead or not and restart it if it is dead. 5 minutes is the lowest setting you can have if I remember correctly.
done it and wil see it tomorrow when i wak eup and test it but 5 minute it's too long because my bot run trivia , don't have any way to kill and bring it back after kill few second ? :)
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

oh my bad you can do

Code: Select all

./autobotchk eggdrop.conf -1 -noemail
1 minute intervals is the best you can have using crontab.

Out of curiosity why do you need to kill your bot every hour? especially a trivia bot?
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
cambodia
Halfop
Posts: 73
Joined: Sun Aug 22, 2004 1:03 am
Location: cambodia

Post by cambodia »

tell you the truth i'm using nerfbendr trivia script ( unregister version ) and when it ask about 100 question it will hang up after i kill and bring back it will work as normal and i decide to kill it every 1 hours or 2 hours make sure it kill and back and then trivia will keep working forever ,

any suggestion beside this ? i'm not sure every person who run that script have same problem as me or just only me , and if only me what the reason ? :D
User avatar
cambodia
Halfop
Posts: 73
Joined: Sun Aug 22, 2004 1:03 am
Location: cambodia

Post by cambodia »

Code: Select all

18550  ??  S      0:01.28 ./eggdrop eggdrop.conf (eggdrop-1.6.15)
is this mean my bot online 1 hours and 28 minutes ?

but when i whois my bot in irc i saw

Code: Select all

khmer has been idle 8secs, signed on Sat Mar 19 14:19:13

while time now [15:19:46] ( in irc )

18550  ??  S      0:01.95 ./eggdrop eggdrop.conf (eggdrop-1.6.15) ( in shell )

and it not kill the bot :(
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

is the script loaded? type

Code: Select all

.binds
in dcc and see if there is a time bind for dieproc.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
cambodia
Halfop
Posts: 73
Joined: Sun Aug 22, 2004 1:03 am
Location: cambodia

Post by cambodia »

yes it got :)
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

that script should kill your bot on the hour every hour. not an hour after its been started. if you want it to be an hour from start use this code instead.

Code: Select all

bind evnt - init-server dieproc

proc dieproc { } {
        timer 60 {die "Bot restarting"}
} 
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
cambodia
Halfop
Posts: 73
Joined: Sun Aug 22, 2004 1:03 am
Location: cambodia

Post by cambodia »

it seem the same every hours vs 1 hours :) but the problem don't know why it not work with my eggdrop :( , ok i will try the new command :)
d
domp
Voice
Posts: 13
Joined: Wed Apr 13, 2005 6:35 am

Post by domp »

^DooM^ wrote:that script should kill your bot on the hour every hour. not an hour after its been started. if you want it to be an hour from start use this code instead.

Code: Select all

bind evnt - init-server dieproc

proc dieproc { } {
        timer 60 {die "Bot restarting"}
} 
should it work when the timer is set to one ?
Locked