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.

Two eggdrop in the same VPS

General support and discussion of Eggdrop bots.
Post Reply
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Two eggdrop in the same VPS

Post by juanamores »

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 :)
w
willyw
Revered One
Posts: 1197
Joined: Thu Jan 15, 2009 12:55 am

Re: Two eggdrop in the same VPS

Post by willyw »

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.
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 !
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

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 :)
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 :)
w
willyw
Revered One
Posts: 1197
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

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 !
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

There is a problem with autobotchk.
I added 2 bots and botck I have added to this:
./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...
./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.
[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 :)
w
willyw
Revered One
Posts: 1197
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

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 !
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

Thanks willyw fixed! :D

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: Select all

# 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 :)
w
willyw
Revered One
Posts: 1197
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

juanamores wrote:Thanks willyw fixed! :D
That is good to know. :)
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: Select all

# 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 !
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

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 :)
w
willyw
Revered One
Posts: 1197
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

juanamores wrote: ....
You can put the Bot.botchk there?
Try it. Experiment. :)


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 !
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

willyw wrote: Try it. Experiment. :)
...
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 :)
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

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: Select all

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 :)
User avatar
Get_A_Fix
Master
Posts: 206
Joined: Sat May 07, 2005 6:11 pm
Location: New Zealand

Post by Get_A_Fix »

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: Select all

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.
Post Reply