Author Topic: Error Wont stay connected  (Read 9599 times)

0 Members and 1 Guest are viewing this topic.

Offline Ender

  • x86
  • Hero Member
  • *****
  • Posts: 2390
    • View Profile
Re: Error Wont stay connected
« Reply #15 on: November 06, 2007, 10:50:53 pm »
Use the command nohup. That way, when you end a terminal session, the program doesn't die.

nohup java -jar javaop.jar &

or something like that

Offline xgreedyx

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • The Art Of War
Re: Error Wont stay connected
« Reply #16 on: November 06, 2007, 11:22:46 pm »
I'm not sure how I would do that, but I have an idea. (I'm not a complete noob!! LOL) I would take that code and put in a text. What  do you think I should name the whole file? After I decide that how should I start it or make sure that I am using the correct commands? I bought this "Linux book for Dummies", but I think I should find a better one, which has more information about running a dedicated server. My book goes over all the different types of Linux OS that is available. It explains how to install applications as well, but it shows it using the GUI.
Code: [Select]
#!/bin/sh
PIDFILE=bnubot.pid
if [ -f $PIDFILE ] ; then
        echo "it is still running"
else
        echo "starting a new one"
        java -jar BNUBot.jar -plugins net.bnubot.bot.html.HTMLOutputEventHandler > stdout.txt 2> stderr.txt &
        pid=$!
        echo $pid > $PIDFILE
fi

P.S. Blaze.....
I use google all the time and read and search when i'm confused or stuck. But I didn't come here for that root adduser problem. It was just brought up in conversation, so I thought what harm would it hurt to ask about it. I felt comfortable knowing that there were some knowledgable guys here and they seemed very helpful. My main point though... I always google before posting  ;D
It Is What It Is...... With Out The Playa There Would Be No GAME!

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Error Wont stay connected
« Reply #17 on: November 07, 2007, 12:45:33 am »
Yes, paste that in to a file called "check.sh" and then do "chmod 755 check.sh" and "./check.sh"

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline xgreedyx

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • The Art Of War
Re: Error Wont stay connected
« Reply #18 on: November 07, 2007, 11:54:53 pm »
Yes, paste that in to a file called "check.sh" and then do "chmod 755 check.sh" and "./check.sh"

Ok will do ty so much you been a great help.....

I'm so siked though I been looking for a bot for our clan to setup on my box for 3years and I just found this lol You guys rock!
It Is What It Is...... With Out The Playa There Would Be No GAME!

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Error Wont stay connected
« Reply #19 on: November 08, 2007, 04:11:13 pm »
If I run on my PC I see that file. But when running on the linux server it don't exist.

Note that in Linux, a file name that starts with . isn't visible. Pass the -a argument (all) to ls to see them.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline xgreedyx

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • The Art Of War
Re: Error Wont stay connected
« Reply #20 on: November 11, 2007, 02:56:36 am »
thankyou.........
It Is What It Is...... With Out The Playa There Would Be No GAME!