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: Linux OS  (Read 2807 times)

0 Members and 2 Guests are viewing this topic.

Offline Xaverik

  • BeBot Rookie
  • *
  • Posts: 1
  • Karma: +0/-0
Linux OS
« on: September 24, 2010, 02:38:22 pm »
Hi.
Might be i am blinded but i cant find any post to this theme.
By the time the bot is running on the private pc of guild member.
Any time he finished his daily session, the bots away.
Therefor we wanna install the bot at our private Web Server as anything else we have like Teamspeak, Guild Forum , Homepage Raidplaner.

But we still dont know if we can use the same version as under Windows.

Thanks for answering

PS. Im sorry. seemed to me i've made a mistake  >:( thats an question I need answered. Not a vote  8) Beg your pardon
« Last Edit: September 24, 2010, 02:49:56 pm by Xaverik »

Offline Drizzurdeen

  • BeBot Apprentice
  • ***
  • Posts: 193
  • Karma: +0/-0
    • Obsidian-Cult
Re: Linux OS
« Reply #1 on: September 24, 2010, 11:49:46 pm »
so hier mal die aktuelle version des BeBots mit startscript für LINUX

http://obsidian-cult.de/downloads/BeBot_aktuell.rar

workaround:
1) erstelle einen unser inkl. verzeichnis
2) lade den botordner in das homeverzeichnis des users
3) lade die bot.sh in das homeverzeichnis des users
4) passe die bot.conf und MySQL.conf an (vorher bitte ne MySQL DB erstellen)
5) passe die verzeichnispfade in der bot.sh an

!!! bei LINUX !!! bitte die bcmath und die sockets für php nachinstallieren sofern noch nicht passiert

6) die bot.sh muss mind. 755 haben
7) logge dich mit dem bot-user über ssh ein

!!! befehle !!!
./bot.sh start (startet den Bot)
./bot.sh stop (stopt den Bot)
./bot.sh status (na der status des Bots halt)

über die datei nohup.out logt der bot alles mit ... diese sollte nun aber so ca. 1x pro monat einfach geleert werden ... wird sonst zu groß ^^

bei fragen immer gerne

greetz da drizz

Offline Huesos

  • BeBot User
  • **
  • Posts: 45
  • Karma: +0/-0
Re: Linux OS
« Reply #2 on: September 25, 2010, 06:35:36 pm »
google translator:

German to English translation
So here once the current version of the BeBot with start script for LINUX

http://obsidian-cult.de/downloads/BeBot_aktuell.rar

workaround:
1) create a directory including our
2) the botordner invite into the home directory of the users
3) invite the bot.sh in the home directory of the users
4) Create and customize the bot.conf mysql.conf to (before your ne MySQL DB)
5) adjust the directory paths in the bot.sh

! in LINUX! bcmath your sockets and re-install for php has not already happened

6) the bot.sh must be at least 755 have
7 log) up to the bot-user via a ssh

! command!
. / Bot.sh start (start the bot)
. / Bot.sh stop (stops the bot)
. / Bot.sh status (well the status of the bot-containing)

the file will log the nohup.out had it all, with ... But this should be emptied so about 1x per month simple ... is too large ^ ^

have and always happy

greetz da drizz

Offline muso

  • BeBot Rookie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: Linux OS
« Reply #3 on: September 28, 2010, 03:15:02 am »
hello i am try to start the bot with the .sh but i am always get errors

Code: [Select]
root@crompugs:/srv/d_crompugs/www/crompugs.com/htdocs# ./bot.sh start
Starting Bot
/usr/bin/nohup: appending output to `nohup.out'
Failed to start bot


My file at the moment

 
Code: [Select]
#!/bin/sh
BASEDIR="/srv/d_crompugs/www/crompugs.com/htdocs/BeBot"
PHPBIN="/usr/lib/php5"
CMD="${BASEDIR}/StartBot.php"
# If you want to use your own INI file
# set the location of the ini file and
# comment out the two following lines
#INI="${BASEDIR}/php.ini"
#CMD="${PHPBIN} -c ${INI} ${BASEDIR}/bot.php"
NOHUP=/usr/bin/nohup

Error() {
  echo "Error: $1"
  exit 1
}

[ -d ${BASEDIR} ] || Error "Make sure the BASEDIR variable is set
  The value ${BASEDIR} is not valid"

[ -f "${BASEDIR}/StartBot.php" ] || Error "Make sure the BASEDIR variable
is
properly set
  I could not find helpbot.php in ${BASEDIR}"

[ -x ${PHPBIN} ] || Error "Make sure the PHPBIN variable is set
  The value ${PHPBIN} is not valid"

[ -x ${NOHUP} ] || Error "Make sure the NOHUP variable is set
  The value ${NOHUP} is not valid"

case $1
in
start*)
  PID=`/bin/ps x | /bin/grep -v grep | /bin/grep "$HOME/BeBot/StartBot" | awk '{ print $1; }'`
  ANS=0
  [ "${PID}" != "" ] || ANS=1;

  if [ $ANS -eq 0 ]
  then
    echo "Bot already running PID=${PID}"
  else
    echo "Starting Bot"
    cd ${BASEDIR}
    ${NOHUP} ${CMD} &

    PID=`/bin/ps x | /bin/grep -v grep | /bin/grep "$HOME/BeBot/StartBot" | awk '{print $1;}'`
    if [ "$PID" = "" ]
    then
      echo "Failed to start bot"
    else
      echo "Bot Started"
    fi
  fi
;;
stop*)
  PID=`/bin/ps x | /bin/grep -v grep | /bin/grep "$HOME/BeBot/StartBot" | awk '{ print $1; }'`
  ANS=0
  [ "${PID}" != "" ] || ANS=1;

  if [ $ANS -eq 0 ]
  then
    echo "Stopping bot matching PID=$PID"
    kill ${PID}
  else
    echo "Bot is not running"
  fi
;;
status*)
  PID=`/bin/ps x | /bin/grep -v grep | /bin/grep "$HOME/BeBot/StartBot" | awk '{ print $1; }'`
  ANS=0
  [ "${PID}" != "" ] || ANS=1;

  if [ $ANS -eq 0 ]
  then
    echo "Bot running PID=$PID"
  else
    echo "Bot not running :("
  fi
;;
*)
echo "Usage: $0 {start|stop|status}";
;;
esac



I did try  lots of thing any idea what is wrong?
The bot is working fine only problem is stop when i close the putty so i need this script but i cant start it!
« Last Edit: September 28, 2010, 05:02:16 am by muso »

Offline Huesos

  • BeBot User
  • **
  • Posts: 45
  • Karma: +0/-0
Re: Linux OS
« Reply #4 on: September 28, 2010, 07:13:26 am »

Offline muso

  • BeBot Rookie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: Linux OS
« Reply #5 on: September 28, 2010, 12:44:16 pm »
root@crompugs:/etc/init.d# ./seregbot.sh start                                  ./seregbot.sh: 12: screen: not found

same dosnt work


Ok i think is working now but everithing what i read here couldnt help!
« Last Edit: September 28, 2010, 02:03:16 pm by muso »

Offline Drizzurdeen

  • BeBot Apprentice
  • ***
  • Posts: 193
  • Karma: +0/-0
    • Obsidian-Cult
Re: Linux OS
« Reply #6 on: September 28, 2010, 04:03:26 pm »
of course the bot.sh dont work ... u have to edit the path of the homedirectory of the bot

for example ... u have created a user including a directory ... aduser -m botti ... so the directory path in the bot.sh must be
BASEDIR="/home/botti/BeBot (but only when the directory of the bot called BeBot)

u have eiter edit the path in the commands like this
PID=`/bin/ps x | /bin/grep -v grep | /bin/grep "$HOME/BeBot/StartBot" | awk '{ print $1; }'`

and so on ...

hope it is helpful

greetz da drizz

Offline muso

  • BeBot Rookie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: Linux OS
« Reply #7 on: September 28, 2010, 04:17:14 pm »
Code: [Select]
root@crompugs:/srv/d_crompugs/www/crompugs.com/htdocs# adduser htdocs
Adding user `htdocs' ...
Adding new group `htdocs' (1000) ...
Adding new user `htdocs' (1002) with group `htdocs' ...
Creating home directory `/home/htdocs' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for htdocs
Enter the new value, or press ENTER for the default
        Full Name []:
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [y/N] y
root@crompugs:/srv/d_crompugs/www/crompugs.com/htdocs# ./bot.sh start
Error: Make sure the BASEDIR variable is set
  The value /ho[code]me/htdocs/BeBot is not valid

Code: [Select]
#!/bin/sh
BASEDIR="/home/htdocs/BeBot"
PHPBIN="/usr/lib/php5"
CMD="${BASEDIR}/StartBot.php"
# If you want to use your own INI file
# set the location of the ini file and
# comment out the two following lines
#INI="${BASEDIR}/php.ini"
#CMD="${PHPBIN} -c ${INI} ${BASEDIR}/bot.php"
NOHUP=/usr/bin/nohup

Code: [Select]
and edited : PID=`/bin/ps x | /bin/grep -v grep | /bin/grep "$HOME/BeBot/StartBot" | awk '{print $1;}'`

and is say  :
Code: [Select]
root@crompugs:/srv/d_crompugs/www/crompugs.com/htdocs# ./bot.sh start
Error: Make sure the BASEDIR variable is set
  The value /home/htdocs/BeBot is not valid

finaly i started with :
Code: [Select]
cd /srv/d_crompugs/www/crompugs.com/htdocs/BeBot/; su -c "php5 StartBot.php" adminand only this work fine :)

« Last Edit: September 28, 2010, 05:02:15 pm by muso »

 

* 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: 186
  • 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