[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

    PierreLouis

    CraftBukkit Server Manager

    Information:
    This is a server manager/utility I wrote that comes with my setup script. I've decided to release it separately as it is pretty useful.
    It should work on any Linux Distribution, I test it on Ubuntu and Debian.

    Note: I collect anonymous statistics! (Current date, Action: Launch/Install, Script Version)
    You can check them here: http://cblauncher.netne.net/

    Features:
    - Easy Configuration:
    The script generates a file where you can configure everything


    - Mobile:
    Moving your server around your disk, or even on an external disk won't break anything.

    Only relative paths were used!


    - Server Updater:
    Keeps your server executable up to date. Works with the official executable (minecraft_server.jar) CraftBukkit (Recommended, Beta, and Developer builds) and SpiGot.


    - Script Updater:
    The script can also update itself.


    - RAM Disk Management:
    The script can mount a RAMDisk, move your worlds there and link them back to the original folder. It also makes sure the RAMDisk is big enough for your worlds and new data (at least 200MBs free, minimum 500MBs).

    Inspired by TNT's guide: forums.bukkit.org


    - World Backups:
    The script can backup your worlds and plugins (without the jars), compress the backups, keep only X backups, just for you to feel safe!


    - Error Handling:
    The script handles funky situations like no server executable (downloads it), or no internet connection (starts in offline mode), etc.


    - Even More:
    I didn't list everything here, if you want to know more about the script, use it!


    Command List:
    Code:
    backup:    Backup the world(s)
    close:      Stop the script but not the server
    delay:      Delay next scheduled backup/restart/stop by specified time
    exit:      Stop the server and the script
    read:      Get the value of a setting in server.properties
    restart:    Restart the server
    set:        Change a setting from server.properties to the specified value (restart required)
    start:      Start the server
    skip:      Skip next backup/restart
    toggle:    Toggle a setting from server.properties (restart required)
    To Do:
    • All of your requests
    • Changelogs for CraftBukkit updates (I'll need help for that)

    Done:
    • Backup limiter (0.2.5)
    • Backup World List (1.0)
    • Backup Schedules (0.4)
    CraftBukkit++ (the project was discontinued), SpiGot and Minecraft_Server.jar support (0.4)
    • Full Linux support (1.0)
    • Plugin configuration backups
    • Ubuntu support (0.2.5)
    • Scheduler (0.2.4)

    Requirements:
    • Java
    • Curl
    • Python
    • Screen
    If you don't know what these are, don't worry, the script will install what you need!

    Download:
    <font color="#1061b3">DropBox (latest)</font>

    I recommend using the IR_Black theme for your Terminal:
    - <font color="#1061b3">OS X (Mountain) Lion</font>
    - <font color="#1061b3">OS X Snow Leopard</font> (<font color="#1061b3">Color Fix</font>)
    - Color Codes:
    Black #4E4E4E #7C7C7C

    Red #FF6C60 #FFB6B0

    Green #A8FF60 #CEFFAB

    Yellow #FFFFB6 #FFFFCB

    Blue #96CBFE #B5DCFE

    Magenta #FF73FD #FF9CFE

    Cyan #C6C5FE #DFDFFE

    White #EEEEEE #FFFFFF


    If you get a permission error when opening the script:
    Changelog:
    Older changelogs:

    Show Spoiler



    Pictures:
    Version 1.0.1:
    [​IMG]
    A: You can see what is up with the server
    B: You can interact with the script, and get quick information (refreshes every 10secs):
    - 1: World name (green = server is running, red = server is stopped)
    - 2: IP adress (green = connected to the internet, red = offline mode)
    - 3: Players/Maximum players (green = server is less than 1/2 full, yellow = server is more than 1/2 full, red = server is more than 3/4 full)
    - 4: Script version (green = up to date, red = outdated)
    - 5: Minecraft Mod: Version (green = up to date, red = outdated)

    Outdated (0.2.3):

    Show Spoiler
    • Configuration recap: http://img51.imageshack.us/img51/7017/configcomplete.png
    • Complete Run (using default configuration): http://img440.imageshack.us/img440/360/fullrun.png
     
    Last edited by a moderator: Feb 19, 2017
  2. Offline

    hawkfalcon

  3. Offline

    PierreLouis

    Added pics, changelog for 0.2.3 and feature description for RAM Disk (new in 0.2.3)
     
  4. Offline

    hawkfalcon

    Can you add a scheduler? At 10:30 it goes off until 12:00 or something like that. That would be awesome:)
     
  5. Offline

    PierreLouis

    I'll look into it.
     
  6. Offline

    PierreLouis

    I updated the script!
    It now has the scheduler, it also doesn't override "online-mode" anymore, and I improved some stuff. :)
     
  7. Offline

    Milkywayz

    Looks incredibly awesome. I'm getting my new pc tommarrow and I'm going to install ubuntu on it and i was looking for a up to date manager so I could use a ramdisk. Also if there isnt already a function, make it so that after like 5 backups it removes the last one. The hard drive i bought is a crappy 500gb hitachi which is only temporary so i don't have room for more then 50 back ups
     
  8. Offline

    PierreLouis

    Thanks! :)
    It might not work out of the box on Ubuntu, I'll test it today, and try to fix what isn't working.
    And if I have time, I'll add the backup limit.

    EDIT: Just FYI, I'll do all of that on 12.04 in a VM.
     
  9. Offline

    Milkywayz

    Instead of ramdisk i ordered a ssd but short term ramdisk might work till it gets here.
     
  10. Offline

    PierreLouis

    Quick update on the port:
    Most of the script is now working, I had to ditch the defaults command, and change a bunch of stuff, but it's working now. All I need to port now is the RAM Disk, and Timer parts. Then I'll add the backup limit.
    I think I can get this done today! :)
     
  11. Offline

    Milkywayz

    Awesome thanks for the great support, i just realized now that i may have forgotten to order a optical drive with my computer so i need to figure out how i can install ubuntu on it, hopefully it comes with some random os D:
     
  12. Offline

    PierreLouis

    Ouch! Well good luck with that!
     
  13. Offline

    Milkywayz

    Ended up having to pick up a internal cd drive at bestbuy for 32 bucks. But I installed ubuntu smoothly and Im almost ready to start my server back up!
     
  14. Offline

    PierreLouis

    $32 doesn't seem to bad! :)

    I'm not entirely done, but here's the WIP script: LaunchServer.command
    The RAM Disk part is the only one that doesn't work yet.
    The rest is was rewritten to work on both OS X and Ubuntu.
    If you don't have screen or curl, it'll install that for you. But you'll have to install java on your own as I'm not sure what version you will want to use.
    If you find any bugs/glitches, tell me I'll fix those. :)
     
  15. Offline

    PierreLouis

    I've finished porting the script to Ubuntu.
    Every feature is working, plus I added some cool new stuff, such as the backup limiter, and instead of having fixed hours of start and stop for the Timer, you can set them to 5 minutes from now ( that would be '$(In 00:05)'), or in one hour and a half: '$(In 01:30)', etc. Plus there's a prompt when you use the timer, it can't read from the server, but it can send commands. I did recreate the help default page, and command helps though, so you can access that if you don't know what to do.
    Please download the script again (if you already did) as I didn't think of appending 'BETA' to your version of the script, meaning it won't see any update. :(

    Please give me feedback on what you'd like to change! :)
     
  16. Offline

    Milkywayz

    Ill give it a try :D
     
  17. Offline

    PierreLouis

    Alright! :D
     
  18. Offline

    Milkywayz

    Why is Scheduler crossed out? Some auto restarts would be excellent, also some commands to schedule next restart, etc would be fantastic.
     
  19. Offline

    PierreLouis

    Because it's done. I'll make that clearer. :)
     
  20. Offline

    PierreLouis

    I'll have an update out tomorrow again, this will improve the $(In HH:MM) function. It had problems with zeros.
    Also, you can schedule restarts. The properties file will have comments explaining what an option does, and what values it can have. The RAM Disk part is more efficient on Ubuntu, and as always bug fixes!
     
  21. Offline

    hawkfalcon

    Nice! Also, I like Milkywayz suggestion about scheduling commands on restart would be cool.
     
  22. Offline

    PierreLouis

    I don't know why, I totally forgot about that!
    It'll be in there too! :)
     
  23. Offline

    PierreLouis

    Updated the script to 0.3.2! :D
     
  24. Offline

    hawkfalcon

    Not sure what the new version added.:0
     
  25. Offline

    PierreLouis

    I always add the change log to the main post. :)

     
  26. Offline

    hawkfalcon

    What does extended aliases mean??:/
     
  27. Offline

    PierreLouis

    If you use the schedule option, there's a custom prompt.
    From that prompt you can use aliases you defined in "LauncherAliases.properties", with the update you can also use the aliases you define in "bukkit.yml". :)
     
  28. Offline

    gustebeast

    Errors

    1) LaunchServer.properties: line 1: -e: command not found

    Is this an issue with not having Screen and/or Curl? I am running a mac with lion installed and I think Curl comes installed, but Im not sure about Screen. Could you give a quick description on how to install Screen? I googled "screen installation" but its not a specific enough search.

    2) Im not sure if its related but every time I start the script I have to go through configuration again, the config file gets reset even if I've edited it. It says this, 'Some settings are missing'

    3) When I run the 'restart' command from the GUI the server doesnt shut down correctly. It says that the server is back up, I still cant connect. When I type 'view' to see the server log it shows me a 'Failed to bind to Port' error. The only way I can get it to work is going into activity monitor and force quitting the java process.

    Some New Ideas.

    1. Could you add a hook for craftbukkit mods like SpiGot and Craftbukkit++, I personally use SpiGot, but the script overrides it thinking its an old craftbukkit build.

    2. Could you add a time function for the backup aswell? I restart my server often and I dont want it to backup every time I do so, I would rather have it backup every day at noon or just every 24 hours.

    3. From the main GUI you can switch to viewing the server log with 'view' this is nice if you want to see what people in the server are saying ect., but then when you want to restart the server there is no way to get back. Is there any way to add a feature that lets you return to the original GUI where you can run commands like 'restart'?

    4. An in-game /restart command (and maybe others). You could make a server-side plugin to go along with your script to offer true integration.

    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

    So I've integrated both Craftbukkit++ and SpiGot, it handles updates, and all that stuff. :)
    Unfortunately, I don't know any Java, so making a plugin isn't possible.
    I'm starting the backup interval now. Done!

    3. You can! It's "Ctrl + A + D".
     
  30. Offline

    gustebeast

    Great what about the Errors?
     
Thread Status:
Not open for further replies.

Share This Page