egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Two eggdrop in the same VPS

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Mon Jun 29, 2015 10:30 pm    Post subject: Two eggdrop in the same VPS Reply with quote

I want to put 2 bots eggdrops on the same server (VPS).
The questions I have are:
1) I must install and compile the new eggdrop bot for the new?
2) I can be installed on a different path or process eggdrop different name? botchk tcl, how distinguishes to both processes eggdrop?

I apologize for my bad English, I hope you understand the questions.
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Tue Jun 30, 2015 2:54 am    Post subject: Re: Two eggdrop in the same VPS Reply with quote

juanamores wrote:
I want to put 2 bots eggdrops on the same server (VPS).
The questions I have are:
1) I must install and compile the new eggdrop bot for the new?


No.

Quote:

2) I can be installed on a different path or process eggdrop different name? botchk tcl, how distinguishes to both processes eggdrop?



One of the things that must be configured in the botchk file is the name of the .conf file used to run the bot.


To run two or more bots (assuming your provider does not care) you simply need to create a new
eggdrop.conf
file for each bot. As you edit it, keep it in mind, that there will be more than one bot running now.
For example, I would want to change this default line:
logfile mco * "logs/eggdrop.log"
as I wouldn't want two or more bots using the same file.

I suggest that for file naming, for each eggdrop.conf you have, use the bot's nickname as the filename. As in
ChanBot.conf
Jalapeno.conf
It just makes it easier to manage.

Then, with just one compile and installation, you can do:
./eggdrop ChanBot.conf
and
./eggdrop Jalapeno.conf

thus running two bots from one installation.
Use
ps x
to see them.


I hope this helps.
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Tue Jun 30, 2015 3:05 pm    Post subject: Reply with quote

Perfect willyw, I'm going to make the recommended way.
My idea is to divide the functions (tcls) in 2 bots eggdrop because one has lag (dislay) in certain commands.
I think if I use two different bots, diminish them lag caused by having too many functions into one.
If new questions arise me in practice the'll ask for this thread.
Thank You Smile
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Tue Jun 30, 2015 4:56 pm    Post subject: Reply with quote

Forget to specifically mention the
listen
port. But if you are thinking, as you edit each of the .conf files, you will realize that each bot must have a unique listen port configured.

I hope it all works well for you.
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Tue Jun 30, 2015 9:30 pm    Post subject: Reply with quote

There is a problem with autobotchk.
I added 2 bots and botck I have added to this:
Quote:
./autobotchk eggdrop.conf -noemail -5
./autobotchk eggdrop2.conf -noemail -5


Each conf belongs to each of the bots.
Accepts the command, but only by the VPS cron process is displayed, the file is overwritten, leaving only the last autobotck created.
I tried creating a separate file for both bots botck called botchk and botchk2
Then...
Quote:

./autobotchk eggdrop.conf -noemail -5
./autobotchk2 eggdrop2.conf -noemail -5


But when viewing cron from VPS withcrontab -l command displays only one because a new file called BOT.botchk is created, and this, it turns to overwrite the last autobotchk created.
Quote:

[juanamores@vps174886 eggdrop]$ crontab -l
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/juanamores/eggdrop/BOT.botchk >/dev/null 2>&1


Is There a solution to accept both cron for each of the bots?
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Tue Jun 30, 2015 11:50 pm    Post subject: Reply with quote

Examine .conf file for both bots, and find:
#set botnet-nick "LlamaBot"


That is the default line.

In both .conf files, are both set to the same ?
I believe that would cause the behavior you are experiencing.

In one .conf file do something like:
set botnet-nick "Bot1"
and the other do:
set botnet-nick "Bot2"

( I would use the real nicks of each bot)

and try again.

Let us know if that lets autobotchk make two lines in crontab, one for each bot.
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Wed Jul 01, 2015 9:38 pm    Post subject: Reply with quote

Thanks willyw fixed! Very Happy

Another doubt that posted in another thread and I got no answer:
For the bot to run when you start the operating system, I found this info, not if it is correct, you tell me if it's okay right?
We must change the rc.local file located in the following path /etc/rc.local
Code:
# cat /etc/rc.local

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
 /home/juanamores/eggdrop/eggdrop eggdrop.conf
 /home/juanamores/eggdrop/eggdrop eggdrop2.conf


It is correct syntax of the last 2 lines?
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Wed Jul 01, 2015 10:18 pm    Post subject: Reply with quote

juanamores wrote:
Thanks willyw fixed! Very Happy



That is good to know. Smile

Quote:

Another doubt that posted in another thread and I got no answer:
For the bot to run when you start the operating system, I found this info, not if it is correct, you tell me if it's okay right?
We must change the rc.local file located in the following path /etc/rc.local
Code:
# cat /etc/rc.local

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
 /home/juanamores/eggdrop/eggdrop eggdrop.conf
 /home/juanamores/eggdrop/eggdrop eggdrop2.conf


It is correct syntax of the last 2 lines?




I can't say for sure, because I don't concern myself with it. If the server goes down, and is eventually re-started, my bots eventually come back up due to crontab entries, like we have just discussed. That's good enough for me.

I'd have to research what you are doing - and you can do that just as well as I.

One thought though:
Why do this command? "eggdrop eggdrop2.conf" Why not just run the Bot.botchk file ? ... just something to think about.
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Thu Jul 02, 2015 1:20 am    Post subject: Reply with quote

willyw wrote:

Why do this command? "eggdrop eggdrop2.conf" Why not just run the Bot.botchk file ? ... just something to think about.

I thought you could only put eggdrop executable (./eggdrop eggdrop.conf).
You can put the Bot.botchk there?
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Thu Jul 02, 2015 8:19 am    Post subject: Reply with quote

juanamores wrote:

....
You can put the Bot.botchk there?


Try it. Experiment. Smile


When I make a mistake when writing a script, and crash the bot - for some reason I now have the habit of running the botchk file, to start the bot again.
I suppose that is what made me think of it.

It probably doesn't matter which way you choose to do it. Whatever works, and suits you.

Perhaps somebody else will care to comment on it here, too.
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Fri Jul 03, 2015 3:23 pm    Post subject: Reply with quote

willyw wrote:

Try it. Experiment. Smile
...

To try would have to reboot my server and bring down everything that is in it. I think it is better to wait one day fails VPS and watch the behavior of the rc.local file.

If anyone knows the correct syntax and proven to be put in the rc.local file could share in this thread.
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Sun Jul 05, 2015 4:45 am    Post subject: Reply with quote

In this post I found the solution.
De Kus wrote:

put in a script that makes:
cd /home/user/eggdrop
su user -c ./eggdrop


In my case I have 2 bots I guess it should be:
Code:
cd /home/juanamores/eggdrop
su juanamores -c ./eggdrop eggdrop.conf
su juanamores -c ./eggdrop eggdrop2.conf


Await opinions .....
_________________
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks Smile
Back to top
View user's profile Send private message
Get_A_Fix
Master


Joined: 07 May 2005
Posts: 206
Location: New Zealand

PostPosted: Sat Jul 11, 2015 11:06 am    Post subject: Reply with quote

For autobotchk, you also need to set the nickname of the bot to be different, along with the botname.conf file.

This way, it will be able to use that as the descriptor.
IE:

    ./autobotchk firstbot.conf -dir /home/myhome/eggdrop -noemail
    ./autobotchk secondbot.conf -dir /home/myhome/eggdrop -noemail


AFAIK, it reads the set nickname, to associate the crontab to.

Code:

istok@matrix:~$ crontab -l
0,10,20,30,40,50 * * * * /home/istok/eggdrop/Dog_Matix.botchk >/dev/null 2>&1
0,10,20,30,40,50 * * * * /home/istok/eggdrop/chatbox.botchk >/dev/null 2>&1
0,10,20,30,40,50 * * * * /home/istok/eggdrop/abusive.botchk >/dev/null 2>&1
0,10,20,30,40,50 * * * * /home/istok/eggdrop/Get_A_Fix.botchk >/dev/null 2>&1
istok@matrix:~$


Each of those are the nicks of my bots.
_________________
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber