[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

    Can you disconnect from the screen session while leaving the process running. Like can I be at the script menu then disconnect without canceling the schedualing.
     
  2. Offline

    PierreLouis

    Yes, the server is in a completely separate screen, in the background (same for the schedule), you can close the script, but leave the server running and the schedule.
    In the 1.0 preview I posted here last week, the schedule doesn't work, but I'll have one ready later today where it does. And using close will do what you want (leave the schedule, and server, but go back to the prompt).

    EDIT:
    I'm testing the script over ssh on a Ubuntu VM.
    What's your server's distribution?
     
  3. Offline

    gustebeast

    Is this what you want?
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=12.04
    DISTRIB_CODENAME=precise
    DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"
     
  4. Offline

    PierreLouis

    Thanks!
    Quick question, do you get perl errors when ssh'ing into the server and running the script?
    I get this:
    Code:
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_CTYPE = "UTF-8",
        LANG = "en_US.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    I can fix it easily, but just wanted to know, is that just me?
     
  5. Offline

    gustebeast

    Never seen that before.
     
  6. Offline

    PierreLouis

    Well I included the fix in the script just in case.


    I here's a second 1.0 preview, everything is working but RAMDisks combined with schedule (not commented out, so it might mess your server up!).
    When you update; also remove the "script" directory. That'll update the scripts in there.
     
  7. Offline

    gustebeast

    So if I do not use RAMDisk, everything should work fine?

    Also, I started testing the script. It ran fine on my home computer, but when I tried it on my linux machine via SSH it said that I wasnt connected to the internet. The server is definatly connected to the internet because others and I can access it. Any ideas?

    One final thing I noticed when running this on my home computer. The script opened up and after testing it a little I typed exit to leave the screen. It quit out fine, but when I tried to reconnect to it using screen, the only available session was the minecraft server. How do you get back to the script menu after you have exited?
     
  8. Offline

    gustebeast

  9. Offline

    PierreLouis

    Yeah, sorry, I really have a ton of work, and not that much time.

    Yes. I still haven't fixed it, but I will soon. :)

    ping checks minecraft.net to see if you have an internet connection. Apparently minecraft.net doesn't respond quickly enough (there's a 1sec timeout), so it fails, and the script thinks it's offline.
    To fix this, open LaunchServer.command in any text editor (via ssh you can use nano), and replace:
    Code:
    ping -t 1 -c 1 minecraft.net > /dev/null 2>&1
    With:
    Code:
    ping -t 1 -c 1 google.com > /dev/null 2>&1
    Just run the script again, the script kills the unneeded screens, and leaves just the server, and the schedule running.
    When you restart the script after using 'close', it sees there's a server running, and connects to it.

    Also, the online player counter was slow, and didn't work in all circumstances, so I implemented the query method, that will always get the count right, the script will use it if "allow-query" is "true" in server.properties.
     
  10. Offline

    gustebeast

    No luck. I tried fixing it, then deleting the whole ping/if lines entirely. When the server starts it tries to download the craftbukkit.jar but it cant because "I am not connected to the internet". Have you run the script on a linux machine before? If so, is there something I can do to fix this error?

    I have one possible source of error. I am actually running the script on a computer that has a server already running. Its my test server that runs on 25564. Would having another minecraft server running distrupt the scripts performance?
     
  11. Offline

    PierreLouis

    Yes, I write the code on OS X, and execute it via ssh in a Ubuntu VM (always up to date), from OS X. That way I reproduce your situation.
    When you removed the 'if' condition, did you leave 'Online=true'. If you didn't it'll default to 'Online=false' because of the way the 'if' conditions are written:
    Code:
    if "$Online"; then
      echo 'Internet connection is online: "$Online" is "true"'
      echo "Online='$Online'"
    else
      echo 'Internet connection is offline: "$Online" anything but "true", possibilities: "false", "empty".'
      echo 'It is empty if you deleted the entire "if" condition'
      echo "Online='$Online'"
    fi
    Yes, the script tries to connect to the server, my reasoning was that you use my script to start the server, so if server.log.lck exists, the server is running and I can send it commands via the screen session I atribute it in my script.
    I'll have to add another 'if' to check if the screen exists, and if it doesn't, but the server is running, it means the server was started without using my script.
     
  12. Offline

    gustebeast

    I wouldnt do that actually. The script I use creates a screen session as well. Also if I ever end up running two servers they will be both using your script. I can very easily shut down my real server (the one with a seperate script) for a few minutes to test the script.

    oh and one more thing. I dont know if you can fix this, but I can only run the script when I'm on as a root user. If I run as anyone else it throws a bunch of permission errors.

    PierreLouis
    OOOOOOH i found the issue. It fails to download SpiGot because SpiGot changes their download location. Go check
    http://forums.spout.org/threads/1-3...ormance-savvy-craftbukkit-mod-out-there.3776/
    Im sure this is an easy fix

    Edit: I was actually able to fix this myself, but you should probably update your version too for future updates.

    One more thing. Make all the script commands have a / before them. So instead of "restart" it would be "/restart". This is to prevent conflicts, namely SpiGot's restart command and essentials help command.

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

    PierreLouis

    Thanks for letting me know! I'll fix that.
    I'll add a prefix option, where you can define a prefix for the script commands. :)
     
  14. Offline

    gustebeast

    An even better idea

    A few more suggestions...

    Could you add an option to additionally backup the plugins folder? I know it can get to be a very large folder, but somehow MineBackup was able to do it fairly quickly, so it must be possible. Maybe it should omit plugin folders that are known to be very large. The one that comes to mind is the dynmap folder, a totally unnecessary thing to backup that takes up tons of space.

    Could you change the method for checking which world files to backup? I have the nether loaded on my server but I dont want to waste time backing it up. I would prefer a simple list like, backup-worlds: 'world, world2, world3'

    Finally, for the server start/stop you have a feature to do an action at a set time, like 2:30 AM. You do not however have that ability for server restarts. I want me server to restart at 12 midnight every day, if I simply set the delay time to 24 hours it would get offset whenever the server crashed or I had to shut it down for some reason. In other words, make the restart scheduler act the same as the start/stop scheduler.

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

    PierreLouis

    I'm working on it! :)
     
  16. Offline

    gustebeast

    One more thing, I want to be able to run two servers on the same machine preferably using your script. Unfortunatly this script requires root access to work, and when I try to run two sessions on the same user account (root) it doesnt work.
    I editted the server script to name the screen sessions Minecraft2-Server and Minecraft2-Script. The script started up fine, but I couldnt enter any commands into the window.
    See if you can get it so that two scripts/servers can be running at the same time on the same machine.
     
  17. Offline

    PierreLouis

    So I'll make the screen name a variable that you can override in LaunchServer.properties, but that won't be there by default, you'll have to add the line:
    Code:
    ServerScreen="Minecraft-Server"
    So if you have to different servers, just add that line to the second one, and change the name! :)

    And you probably know this already, but you'll have to have two different ports for the server to run at the same time.
     
  18. Offline

    gustebeast

    Ok, just make sure to test it out, because when I tried changing the names manually the script just broke.
     
  19. Offline

    PierreLouis

    Maybe you didn't change it everywhere. It's also in script/Utlities.command and script/Main.command.
    That probably why it didn't work.
     
  20. Offline

    gustebeast

    Kk

    When will the update be up (estimate)

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

    PierreLouis

    I'm not really sure, I had a really heavy week (literrally one test per day), so not this week-end; but I should be able to get some work done then.
     
  22. Offline

    hawkfalcon

    Only one test per day? I had 3 today :p
     
  23. Offline

    PierreLouis

    Well that sucks!
    I had math today and I think I nailed it, I'm aiming for 15-18/20 (French grade system isn't letters)! :)
     
    hawkfalcon likes this.
  24. Offline

    gustebeast

    well good luck
     
    PierreLouis likes this.
  25. Offline

    gustebeast

    PierreLouis
    Did you get any work done over the weekend?
     
  26. Offline

    hawkfalcon

    Just be patient please. :)
     
  27. Offline

    gustebeast

    just an honest question :(

    Oh ya and Pierre another thing. Do you use a cron job in your script? I have been getting random hangs (the computer itself crashes) and I cant figure out why. This is the last thing that shows up in the system log before the crash.

    CRON[5685]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)

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

    PierreLouis

    I started the new backup code (to support what you wanted), but didn't get far...


    It doesn't bother me ;)

    Nope, that's not me...
     
    hawkfalcon likes this.
  29. Offline

    gustebeast

    I found out what it is, it turns out my log was full of PHP errors. I had to reinstall a new OS to clear everything and start from scratch. Is there anyway to get curl without getting php? Is curl very important to your script or could that dependency be optional? I ask because I am very hesitant to install any PHP packages after this fiasco.
     
  30. Offline

    PierreLouis

    cURL is used to download everything, including information (updates).
    PHP shouldn't be a cURL dependency though...
     
Thread Status:
Not open for further replies.

Share This Page