BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.4 support => Topic started by: gennero on June 13, 2008, 11:23:32 am

Title: Bebot on linux-vserver - absolute beginner here...
Post by: gennero on June 13, 2008, 11:23:32 am
Well, might be a bit hard to help me since I don't know anything about linux but please give it a try  ;D
I'm paying for a vserver, preconfigured with debian 4.0, and since this machine has not a lot to do I thought it would be nice to host our guildbot on it. That was the easy part of it...

Actually I think I did quite a good work until now, apache, php5 and mysql are working, bebot 0.4.3 is installed and working, even under different user than root (aorunner) and no superuser-rights needed.

My problem is:
I do need to have an open connection to the vserver to keep the chatbot running, as soon as I close the shell I'm using to start the bot it is shutting down. No message, just going off.
Is there a way to "install" the bot as a background task or how will I be able to keep the bot running without an open connection?
Title: Re: Bebot on linux-vserver - absolute beginner here...
Post by: Dracutza on June 13, 2008, 03:32:52 pm
searching the forum would have gotten you an answer 4 hours ago.

a better key word would be "SCREENS"
Title: Re: Bebot on linux-vserver - absolute beginner here...
Post by: Alreadythere on June 13, 2008, 09:08:27 pm
There is either a script flying around here that starts bebot as a background service on linux.

Or install the tool "screen" as Dracutza said, it allows you to detach standard-input and -output from the normal shell. Basically something like the following:
Code: [Select]
screen -
php StartBot.php Botname
Then do CTRL+A D to detach.
To re-attach you only need to do screen -r.
Title: Re: Bebot on linux-vserver - absolute beginner here...
Post by: Temar on June 14, 2008, 01:41:45 am
ok here is the Instruction for screen with Debian

to install
Code: [Select]
apt-get install screen

now you can use 2 ways to start a new screen, i use 2nd cuz i have lots of bots
Start new screen with server address as name
Code: [Select]
screen -
Start new screen with "botname" as name ofc botname being what ever you want
Code: [Select]
screen -S botname

doing this will goto the window(if 1) or list them if more
Code: [Select]
screen -r

you can use the pid or the name or both together to goto a window, i pref the name since i use botname as name
Code: [Select]
screen -r botname

inside a window u can close it and end all actions inside with
Code: [Select]
exit

to detach the screen so you go back to main and it runs in back ground you do
Code: [Select]
[CTRL] + a then d
Title: Re: Bebot on linux-vserver - absolute beginner here...
Post by: gennero on June 14, 2008, 08:34:12 am
Thank you all, especially for the detailed howto

I found the script before posting here but it didn't work for me, in the thread is mentioned to start the bot with a perimeter ('php StartBot.php &') but this didn't work either.
The screen tool is working fine

@Dracutza
I did several forum searches before but they didn't show up any result according to my problem. But I'm still wondering how I should have come to the idea to search for "screen" or "screens", as I said I'm new to linux and I never heard of this tool before.
Title: Re: Bebot on linux-vserver - absolute beginner here...
Post by: Temar on June 14, 2008, 11:45:21 pm
i forgot to say to detach the screen so you go back to main and it runs in back ground you do

[CTRL] + a then d
Title: Re: Bebot on linux-vserver - absolute beginner here...
Post by: Dracutza on June 15, 2008, 05:13:14 am

@Dracutza
I did several forum searches before but they didn't show up any result according to my problem. But I'm still wondering how I should have come to the idea to search for "screen" or "screens", as I said I'm new to linux and I never heard of this tool before.

A search on "Linux" got me the screens data
Title: Re: Bebot on linux-vserver - absolute beginner here...
Post by: Glarawyn on June 16, 2008, 09:35:21 pm
Screen's -d flag is also handy. -d starts screen in detached mode.

screen -dS screenname php StartBot.php


attach with
screen -r screenname

Ocasionally you will find that your screen is still attached somewhere when you do screen -r. To work around this, use screen -Dr screenname.
 
The -D option forces detachment.

Screen has other nifty features like multiuser mode which will allow multiple users to attach to a shared screen.


Title: Re: Bebot on linux-vserver - absolute beginner here...
Post by: Huesos on September 28, 2010, 06:53:47 am
[28-Sep-2010 04:40:02] PHP Warning:  PHP Startup: Unable to load dynamic library './php_extension/php_mysql.dll' - ./php_extension/php_mysql.dll: invalid ELF header in Unknown on line 0
[28-Sep-2010 04:40:02] PHP Warning:  PHP Startup: Unable to load dynamic library './php_extension/php_sockets.dll' - ./php_extension/php_sockets.dll: invalid ELF header in Unknown on line 0


not sure whats happening but those files are there in /php_extension

its on a constant crash loop with the gandi linux server
Title: Re: Bebot on linux-vserver - absolute beginner here...
Post by: Khalem on September 28, 2010, 06:59:52 pm
.dll files are windows libraries, they will NOT work on Linux/Unix which uses .so files for their dynamic libraries.

Please refer to the documentation for your distribution on how to install MySQL and Sockets support for your PHP install. Normally it's a matter of installing an additional package trough whatever package manager your distribution uses.
SimplePortal 2.3.7 © 2008-2024, SimplePortal