Searching for a special GUI

Discussion in 'Bukkit Help' started by meyers, Mar 14, 2011.

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

    meyers

    Hello there,

    is there a Tool that i can manage my Bukkit server from my Machine while i am playing.

    My Server runs on a Linux Vserver. Everytime i want to Shutdown, i have to start Putty, connect, go to the Screen an stop and restart the Server.

    Now i have seen som GUI for Server Admisistration. But i dont know if i can Use then, because they are for people who host the Server on ther local machine. Or did i get it wrong?

    So, does anybody knows such an GUI?

    Greets

    P.S. I'm from Germany, sorry for my English =)
     
  2. Offline

    rushone2009

    Gui on Linux V? Are you mad?

    Here:
    Code:
    #!/bin/bash
    backupdir=/usr/share/java/bukkit/backups/
    bukkitdir=/usr/share/java/bukkit/
    bukkitfilename=craftbukkit.jar
    bukkitupdate=craftbukkit-updater.jar
    
    backupmsg="You's a big fine server, won't ya back that thing up. World file who ya playin wit, back dat thing up."
    
    dateformat=$(date '+%Y%m%dh%Hm%M')
    
    # Make sure you change this to the name of your world folder! Add additional worlds by separating them with a white space. If you only have one world, change this to have only one value like "world" or "creative".
    declare -a worlds=(world nether)
    numworlds=${#worlds[@]}
    
    # Set these for the amount of RAM you want to allocate. Good practice is to have the numbers match.
    # This is the Java heap max and initial size.
    
    javaparams="-Xmx1024M -Xms1024M"
    
    # You can find this location with "whereis java". Make sure this points to the binary.
    
    javaloc=/opt/java/bin/java
    
    # This currently points to the "preferred" release for bukkit which is kind of like a stable version.
    # Change this value if you want to use the snapshot release.
    bukkiturl=http://ci.bukkit.org/job/dev-CraftBukkit/promotion/latest/Recommended/artifact/target/craftbukkit-0.0.1-SNAPSHOT.jar
    
    startbukkit()
    {
        if [ "$(screen -ls | grep bukkit)" == "" ] ; then
            cd $bukkitdir
            screen -S bukkit -dmS $javaloc $javaparams -jar $bukkitdir$bukkitfilename
            echo "Starting bukkit server."
        else
            echo "Bukkit is already running."
            exit 0
        fi
    }
    
    stopbukkit()
    {
        if [ "$(screen -ls | grep bukkit)" == "" ] ; then
            echo "Bukkit is not running."
            exit 0
        else
            screen -S bukkit -p 0 -X stuff "stop$(echo -ne '\r')"
            sleep 5
        fi
    }
    
    updatebukkit()
    {
        if [ "$(screen -ls | grep bukkit)" == "" ] ; then
            sleep 0
        else
            screen -S bukkit -p 0 -X stuff "say Going down for an update in 60 seconds.$(echo -ne '\r')"
            sleep 55
            screen -S bukkit -p 0 -X stuff "say Going down for an update in 5 seconds.$(echo -ne '\r')"
            sleep 5
            stopbukkit
        fi
    
        wget -O $bukkitdir$bukkitupdate $bukkiturl
        sleep 5
        mv $bukkitdir$bukkitupdate $bukkitdir$bukkitfilename
        sleep 5
    }
    
    backupbukkit()
    {
        echo "Starting multiworld backup..."
        if [ "$(screen -ls | grep bukkit)" == "" ] ; then
            sleep 0
        else
            screen -S bukkit -p 0 -X stuff "say '$backupmsg' $(echo -ne '\r')"
            screen -S bukkit -p 0 -X stuff "save-all$(echo -ne '\r')"
            sleep 5
            screen -S bukkit -p 0 -X stuff "save-off$(echo -ne '\r')"
        fi
        if [ -d $backupdir ] ; then
            sleep 0
        else
            mkdir -p $backupdir
        fi
        for ((i=0;i<$numworlds;i++)); do
            cp -R $bukkitdir${worlds[$i]} $backupdir$dateformat
            echo "Saving '${worlds[$i]}' to '$backupdir$dateformat'"
        done
    
        if [ "$(screen -ls | grep bukkit)" == "" ] ; then
            sleep 0
        else
            sleep 5
            screen -S bukkit -p 0 -X stuff "save-on$(echo -ne '\r')"
        fi
        echo "Backup complete."
    }
    
    case $1 in
        start)
            startbukkit
            ;;
        stop)
            stopbukkit
            ;;
        restart)
            stopbukkit
            sleep 5
            startbukkit
            ;;
        update)
            updatebukkit
            ;;
        backup)
            backupbukkit
            ;;
        friendlystop)
            screen -S bukkit -p 0 -X stuff "say Going down in 5 minutes.$(echo -ne '\r')"
            sleep 240
            screen -S bukkit -p 0 -X stuff "say Going down in 60 seconds.$(echo -ne '\r')"
            sleep 55
            screen -S bukkit -p 0 -X stuff "say Going down in 5 seconds.$(echo -ne '\r')"
            sleep 5
            stopbukkit
            ;;
        *)
            echo "Usage: $0 {start|stop|restart|update|backup|friendlystart}"
    esac
    
    exit 0
     
  3. Offline

    Robby Stolle

    can you make this so it does the entire folder? ie plugins and everything
     
  4. Offline

    rushone2009

    What do you mean? Like you want the entire folder updated? Plugins have to to be updated with another plugin.

    Here's a plugin that updates via XML, try to mess with this: http://forums.bukkit.org/threads/admn-bukkitupdater-v0-2-plugin-manager-for-craftbukkit-493.6997/

    I'll try to include that in the code, but I don't think its nessesary to make changes. If you have a plugin like this, it will automatically check plugins and bukkit updates when you run the server, so no need for extra scripting.
     
  5. Offline

    Robby Stolle

    Sorry I mean that it backsup the entire folder.
     
  6. Offline

    FabianN

  7. Offline

    rushone2009

  8. Offline

    Killie01

    i think he means a gui on his pc to connect to his linux stuff,
    also CM can do this with german language support :p
     
Thread Status:
Not open for further replies.

Share This Page