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?
December 02, 2008, 01:36:51 AM

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 565 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: 1085


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
********
Offline Offline

Gender: Male
Posts: 877



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

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
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
********
Offline Offline

Gender: Male
Posts: 877



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

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
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: 414



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
[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]

Starting Bot
by Allisande
[November 28, 2008, 07:08:21 AM]
Stats
Members
Total Members: 1243
Latest: Whackoeng
Stats
Total Posts: 11144
Total Topics: 1505
Online Today: 8
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 1
Guests: 12
Total: 13
Whackoeng

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