collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Bebot on linux-vserver - absolute beginner here...  (Read 20488 times)

0 Members and 1 Guest are viewing this topic.

Offline gennero

  • BeBot Rookie
  • *
  • Posts: 2
  • Karma: +0/-0
Bebot on linux-vserver - absolute beginner here...
« 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?

Offline Dracutza

  • BeBot Apprentice
  • ***
  • Posts: 126
  • Karma: +0/-0
Re: Bebot on linux-vserver - absolute beginner here...
« Reply #1 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"

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Bebot on linux-vserver - absolute beginner here...
« Reply #2 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.

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Bebot on linux-vserver - absolute beginner here...
« Reply #3 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
« Last Edit: June 14, 2008, 11:46:14 pm by Temar »

Offline gennero

  • BeBot Rookie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Bebot on linux-vserver - absolute beginner here...
« Reply #4 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.

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Bebot on linux-vserver - absolute beginner here...
« Reply #5 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

Offline Dracutza

  • BeBot Apprentice
  • ***
  • Posts: 126
  • Karma: +0/-0
Re: Bebot on linux-vserver - absolute beginner here...
« Reply #6 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

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Bebot on linux-vserver - absolute beginner here...
« Reply #7 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.



Offline Huesos

  • BeBot User
  • **
  • Posts: 45
  • Karma: +0/-0
Re: Bebot on linux-vserver - absolute beginner here...
« Reply #8 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

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Bebot on linux-vserver - absolute beginner here...
« Reply #9 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.
BeBot Founder and Fixer Kingpin

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 110
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal