L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 12, 2008, 11:00:57 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > BeBot 0.4 support > Topic: Bebot on linux-vserver - absolute beginner here...
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Bebot on linux-vserver - absolute beginner here...  (Read 480 times)
0 Members and 1 Guest are viewing this topic.
gennero
Freshman
*
Offline Offline

Posts: 2


Bebot on linux-vserver - absolute beginner here...
« on: June 13, 2008, 04: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  Grin
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?
Logged
Dracutza
Apprentice
***
Offline Offline

Posts: 126


Re: Bebot on linux-vserver - absolute beginner here...
« Reply #1 on: June 13, 2008, 08:32:52 AM »

searching the forum would have gotten you an answer 4 hours ago.

a better key word would be "SCREENS"
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1061


Re: Bebot on linux-vserver - absolute beginner here...
« Reply #2 on: June 13, 2008, 02: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:
screen -
php StartBot.php Botname
Then do CTRL+A D to detach.
To re-attach you only need to do screen -r.
Logged
Temar
BeBot Developer
Grandmaster
********
Online Online

Gender: Male
Posts: 783



WWW
Re: Bebot on linux-vserver - absolute beginner here...
« Reply #3 on: June 13, 2008, 06:41:45 PM »

ok here is the Instruction for screen with Debian

to install
Code:
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:
screen -
Start new screen with "botname" as name ofc botname being what ever you want
Code:
screen -S botname

doing this will goto the window(if 1) or list them if more
Code:
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:
screen -r botname

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

to detach the screen so you go back to main and it runs in back ground you do
Code:
[CTRL] + a then d
« Last Edit: June 14, 2008, 04:46:14 PM by Temar » Logged
gennero
Freshman
*
Offline Offline

Posts: 2


Re: Bebot on linux-vserver - absolute beginner here...
« Reply #4 on: June 14, 2008, 01: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.
Logged
Temar
BeBot Developer
Grandmaster
********
Online Online

Gender: Male
Posts: 783



WWW
Re: Bebot on linux-vserver - absolute beginner here...
« Reply #5 on: June 14, 2008, 04: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
Logged
Dracutza
Apprentice
***
Offline Offline

Posts: 126


Re: Bebot on linux-vserver - absolute beginner here...
« Reply #6 on: June 14, 2008, 10:13:14 PM »

Quote from: gennero on June 14, 2008, 01:34:12 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
Logged
Glarawyn
BeBot Developer
Champion
********
Offline Offline

Posts: 399



Re: Bebot on linux-vserver - absolute beginner here...
« Reply #7 on: June 16, 2008, 02: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.


Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > BeBot 0.4 support > Topic: Bebot on linux-vserver - absolute beginner here...
« previous next »
 
Jump to:  

Recent
Bossloot for 5.2
by Brac
[Today at 04:45:17 PM]

!security Levels
by Nytridr
[Today at 02:00:16 PM]

Ported Modules
by Jiheld
[Today at 09:00:13 AM]

raid/point system suggest...
by Temar
[October 11, 2008, 11:45:40 PM]

!timers suggestions: alts...
by Alreadythere
[October 11, 2008, 03:19:46 PM]

!server does not work
by Alreadythere
[October 11, 2008, 06:54:38 AM]

TWC
by clashbot
[October 10, 2008, 08:52:57 AM]

Using Bebot in AoC Raid c...
by IKShadow
[October 09, 2008, 02:38:50 PM]

!items database
by cthulhu
[October 09, 2008, 08:00:27 AM]

File upload issue
by GBH
[October 08, 2008, 10:33:40 AM]
Stats
Members
Total Members: 988
Latest: Talmahera
Stats
Total Posts: 10808
Total Topics: 1458
Online Today: 15
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 18
Total: 20
Zeephonz
Temar

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.258 seconds with 28 queries. (Pretty URLs adds 0.043s, 4q)
Loading...