[Tool] CraftBukkit Server Manager [Mac & Linux]

Discussion in 'Bukkit Tools' started by PierreLouis, Jun 17, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    gustebeast

    Would it be possible to have a version w/o it, say with no automatic updates?
    Also, what is the apt-get/wget that only installs curl. The common package is php5-curl which includes php and apache.
     
  2. Offline

    PierreLouis

    It's just "curl":
    Code:
    apt-get install curl
    php5-curl is curl for php, so it also needs php, but there's curl on it's own. :)
     
  3. Offline

    gustebeast

    PierreLouis
    Do you know how to launch a .command file with sudo? I tried su ./LaunchServer.command and it didnt work. I ask because I would rather not run the server under root user.

    Also, now that I switched I am getting this new error...
    Code:
    stat: cannot read file system information for `%z': No such file or directory
    ./LaunchServer.command: line 638: [:  File: "./SpiGot.jar"
        ID: 11f3766df29f29a8 Namelen: 255    Type: ext2/ext3
    Block size: 4096      Fundamental block size: 4096
    Blocks: Total: 452021123  Free: 451049371  Available: 428268836
    Inodes: Total: 113909760  Free: 113888538: integer expression expected
    ./LaunchServer.command: line 651: [:  File: "./SpiGot.jar"
        ID: 11f3766df29f29a8 Namelen: 255    Type: ext2/ext3
    Block size: 4096      Fundamental block size: 4096
    Blocks: Total: 452021123  Free: 451049371  Available: 428268836
    Inodes: Total: 113909760  Free: 113888538: integer expression expected
     
  4. Offline

    gustebeast

    Oh and I forgot to mention, I was running the script under root when I got this so thats not the cause.
     
  5. Offline

    gustebeast

    PierreLouis
    Are you busy, or did these notifications get lost in your inbox?
     
  6. Offline

    PierreLouis

    Sorry, I thought I had responded already!

    Code:
    sudo ./LaunchServer.command
    That's most likely because of the script not detecting Ubuntu correctly. The command to get a file size is not exactly the same, so using the OS X command on Ubuntu throws that kind of errors.
    Does this happen all the time, or was it just once?
     
  7. Offline

    gustebeast

    Sorry forgot to mention I just switched to Debian, not using Ubuntu rnymore

    Heres what happens when I do 'su ./LaunchServer.command'
    Code:
    Unknown id: ./LaunchServer.command
    Yes I am in the right directory because just ./LaunchServer.command does work
    On and I used su because thats the sudo command on debian
     
  8. Offline

    PierreLouis

    su X is used to login as X.
    So you're essentially telling the computer to login as user "./LaunchServer.command", hence "Unknown id"
    You should use "sudo ./LaunchServer.command". sudo is composed of "su", so login as (defaults to root); and "do", to execute what you pass to the command.

    Also, I'm done with the new backup code, and am making the script work on Debian.
     
  9. Offline

    hawkfalcon

    PierreLouis
    The header file for the download has changed, not sure if that affects you!
    I had to change the way I got the file size. Just letting you know.
     
    PierreLouis likes this.
  10. Offline

    gustebeast

    Ok I realised that I didnt have sudo installed, I installed it and when I ran 'sudo ./LaunchServer.command' it outputted this
    Code:
    sudo: ./LaunchServer.command: command not found
     
  11. Offline

    PierreLouis

    Yeah, I noticed, thanks! :)
    Actually, that's not sudo missing, it just can't find the command - or file - LaunchServer.command. It's probably because you're not cd'ed into the correct directory.
    You should just add a function in your bash initialisation (~/.bashrc or ~/.bash_profile or ~/.profile) file to cd, and start the scipt for you:
    Code:
    LaunchServer() {
      cd /home/User/Desktop/Minecraft\ Server
      sudo ./LaunchServer.command
    }
     
    hawkfalcon likes this.
  12. Offline

    gustebeast

    Ok well I am in the right directory because typing './LaunchServer.command' does work. I dont understand what you mean by the second part of that suggestion though.
     
  13. Offline

    PierreLouis

    Whenever you open your Terminal, bash scans some files (initialisation files) to setup some variables, and do some other stuff. Those files can be modified to customise your Terminal. For example, you can set the PS1 variable that defines the text on the left of the line right before the input (ex: bash-4.2$).
    You can also use the file to define functions (custom commands). So if you define LaunchServer (as I showed you previously), when in your Terminal, you can call it just like any other command, making it easier to do common tasks.
    To configure the LaunchServer fonction, just run this (adjust the path to your MC server) :
    Code:
    echo 'LaunchServer() {
     cd /home/User/Desktop/Minecraft\ Server
     sudo ./LaunchServer.command
    }' >> ~/.bashrc
     
  14. Offline

    gustebeast

    So I paste that into a text document and rename it to start.command?
     
  15. Offline

    PierreLouis

    Nope, paste it into your Terminal (don't forget to change the path in the cd line), and press enter. Then type in "source ~/.bashrc" (or open a new Terminal) and use the command LaunchServer.
    You can read more about this here. :)
     
  16. Offline

    gustebeast

    That seems very complicated. Many times I just need to get into the server quickly and I wont have time to get to this thread copy and paste. Is there anyway I could run it as a .sh file? because 'sudo script.sh' does work for me.
     
  17. Offline

    PierreLouis

    You only copy-paste once. Every time you open a Terminal, it'll go through the initialisation file and load the function, so you'll just have to type in LaunchServer. That's the whole point!
     
  18. Offline

    gustebeast

    oh thats cool! thanks for the tip

    But one more thing about it, how would you remove a function. Say I made a typo and added a command I dont want, how would I remove it?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  19. Offline

    PierreLouis

    If you're connected via ssh :
    Code:
    nano ~/.bashrc
    If you have access to the gui :
    Code:
    xdg-open ~/.bashrc
     
  20. Offline

    gustebeast

  21. Offline

    PierreLouis

    Most of the script is done, the main feature that's missing is RAMDisk management.
    Also I'm gone for a week from now, so I won't be able to do anything until next monday.
     
  22. Offline

    gustebeast

    shucks, well glad you got most of it done.
     
  23. Offline

    PierreLouis

    So I got back, and the RAMDisk is almost complete, I just need to squash some bugs!
    Unfortunately, I had to change some code that forces me to change the scheduler too, so I have to fix that too before release, but we're near the end of the tunnel! :D
     
  24. Offline

    gustebeast

    Lol, whenever you squish one there is always another to replace it.
     
  25. Offline

    PierreLouis

    So I pushed out 1.0! :)
     
  26. Offline

    gustebeast

    :'(
    First launch on my debian...
    Code:
    ./LaunchServer.command: line 792: chflags: command not found
    Loading...
    ./LaunchServer.command: line 214: .Tips.list: No such file or directory
    ./LaunchServer.command: line 214: .Tips.list: No such file or directory
    ./LaunchServer.command: line 792: chflags: command not found
    ./LaunchServer.command: line 792: chflags: command not found
    Some script files are missing
    Could not download them: you are not connected to the internet
    and yes I am connected to the internet.
     
  27. Offline

    PierreLouis

    I'm sorry for the error...
    And I know you're connected, you're posting this! ;)
    Don't worry about the chflags, I forgot to comment that out, and .Tips.list didn't get re-downloaded after the update because the script thought you were offline, so no worry for the .Tips.list error. The strange thing is it thought you were offline. I ping google.com to check, maybe they were down when you used the script (they had 1/2 an hour downtime this week, so it wouldn't be that surprising). Try to start the script again, it should work.
    If it doesn't, type this in your Terminal, and please give me the output:
    Code:
    ping -c 1 -t 1 google.com
    echo "Ping exit code: $?"
     
  28. Offline

    gustebeast

    Oh ya I remember, I posted about this before, it pings a site and the cooldown is too long. See my server is in Germany so it takes longer to ping places in the US

    PING google.com (173.194.35.0) 56(84) bytes of data.
    From static.129.87.9.5.clients.your-server.de (5.9.87.129) icmp_seq=1 Time to live exceeded

    Also the fancy lettering where it fades out the blue text? It looks cool but it prevents me from typing while its happening. I have to wait for it to finish.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  29. Offline

    PierreLouis

    I'm in France and my here are my ping stats:
    Code:
    PING google.com (173.194.34.0): 56 data bytes
    --- google.com ping statistics ---
    10 packets transmitted, 10 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 32.360/33.980/35.608/1.094 ms
    1 second for a ping should be way more than enough, even if you're behind 7 proxies! ;)
    So I'll change the code to check with another website (based in europe) if the google.com ping fails, and then only decide if you're offline or not.

    I'll add an option for that. :)

    EDIT: Try to ping awardspace.com. They're based in Switzerland.
    If that doesn't work, try cuckoo-palace.com, that's from Germany.

    EDIT 2: I pushed 1.0.4, it should fix your offline problem, but I didn't get into the notification thing yet.
     
  30. Offline

    gustebeast

    Its not an issue with the ping. I tried to do ping -t 1 -c 1 awardspace.com, failed. I had to get all the way to ping -t 10 -c 1 awardspace.com before it went through. It took a fraction of a second to get through, but anything lower than 10 it says "time to live exceeded". But all that is beside the point. I set the number to 10 and it still didnt work. It starts up the script, but not the server and it says "failed to check updates". Somehow the script cant access the internet. I can make the script think it is in online mode, thats not the issue. It just cant connect to the internet.
     
Thread Status:
Not open for further replies.

Share This Page