• 0

    posted a message on Edited to note out of date
    This script is outdated and likely unusable.

    I've created a script to assist in administering a Minecraft server. Get the latest script and config: http://adurah.com/minecraft/mcadmin/latest/

    Current version: http://adurah.com/minecraft/mcadmin/0.3.1/
    Current features include:

    TCP server for single and multi-server administration
    Timed say(and other command) intervals
    Chat triggers for commands
    !votekick and !voteban
    Level data backup at timed intervals
    IRC administration bot(requires POE::Component::IRC)
    Newest: Multiple lines for timed intervals and chat triggers
    Newest: NickServ password for the IRC bot
    Newest: Exclude directories from being considered servers
    Newest: Capture lines from the server and write them to specific files
    Newest: Connect triggers to send messages(or do other things) to recently connected users

    Fix: !votekick and !voteban work properly now and are case insensitive

    You'll have to install POE and JSON::XS or JSON::PP from cpan. Windows users will have to install Cygwin and get Perl and the Cygwin installer.

    I've noticed that Cygwin has some issues with certain cpan plugins. Try out the following before trying to install plugins via cpan:
    ln -s /usr/bin/gcc-3.exe /usr/bin/gcc
    ln -s /usr/bin/gcc-3.exe /usr/bin/g++

    So that certain modules that look for gcc and g++ can actually find them.


    Make sure your directory structure is something like...
    ./minecraft/mcadmin_vX_X.pl
    ./minecraft/config.json
    ./minecraft/minecraft-server.jar
    
    ./minecraft/servername/
    ./minecraft/servername/server.properties
    ./minecraft/servername/admins.txt
    ./minecraft/servername/banned.txt
    ./minecraft/servername/banned-ip.txt
    ./minecraft/servername/externalurl.txt
    ./minecraft/servername/players.txt
    ./minecraft/servername/server.log
    ./minecraft/servername/server_level.dat
    
    ./minecraft/servername2/
    ./minecraft/servername2/server.properties
    ./minecraft/servername2/admins.txt
    ./minecraft/servername2/banned.txt
    ./minecraft/servername2/banned-ip.txt
    ./minecraft/servername2/externalurl.txt
    ./minecraft/servername2/players.txt
    ./minecraft/servername2/server.log
    ./minecraft/servername2/server_level.dat

    where servername2 and more named servers are optional.

    Do read all the comments at the top of the script and the comments in config.json.

    Feel free to post and comments, questions and suggestions.
    Posted in: Server Support and Administration
  • 0

    posted a message on Not being able to join on some servers.
    Have you considered that you might've been banned/IP banned?
    Posted in: Legacy Support
  • 0

    posted a message on Linux Automatic Backup (CronJob)
    I made a typo on the crontab entry.
    10/* * * * * /path/to/shellscript.sh >>/tmp/backup.log 2>&1

    Should be:
    */10 * * * * /path/to/shellscript.sh >>/tmp/backup.log 2>&1
    Posted in: Server Support and Administration
  • 0

    posted a message on Linux Automatic Backup (CronJob)
    Quote from AlLnAtuRalX »
    Would this overwrite files older than 24 hours? Like I said, the one I wrote was just specifically for me (the box I'm running this off of has a pretty filled HD, and I can't afford too many backups. Couple that with the fact that I need to go on a 3 week trip in August, and I want it to be as automatic as it can be).
    0 * * * * /bin/cp /home/user/My\ Documents/Mine/server_level.dat /home/user/My\ Documents/Mine/backup/backup`%k`.dat >>/tmp/backup.log 2>&1

    maybe?

    Actually, a shell script is needed. Don't forget to chmod it so it's executable.
    #!/bin/sh
    /bin/cp /home/user/My\ Documents/Mine/server_level.dat /home/user/My\ Documents/Mine/backup/backup`date +%k`.dat

    0 * * * * /path/to/shellscript.sh >>/tmp/backup.log 2>&1

    Yes, it does only keep the last 24 hours worth of backups.
    Posted in: Server Support and Administration
  • 0

    posted a message on Linux Automatic Backup (CronJob)
    Quote from dexter »
    It looks like your one line will only keep a backup of the past hour, overwriting the same file (unless I'm mistaken). He wants a record of backups from the past 24 hours because more than likely you will not find your server griefed within one hour of it happening.

    Adjusted for your observation:
    0 * * * * /bin/cp /home/user/My\ Documents/Mine/server_level.dat /home/user/My\ Documents/Mine/backup/backup`date +%k`.dat >>/tmp/backup.log 2>&1

    Quote from Quatroking »
    Is it possible to have a backup made every 10 minutes instead of every hour?

    That'd look something like this:
    10/* * * * * /bin/cp /home/user/My\ Documents/Mine/server_level.dat /home/user/My\ Documents/Mine/backup/backup`date +%k_%M`.dat >>/tmp/backup.log 2>&1

    Of course, adjust the datestamp to taste.
    Posted in: Server Support and Administration
  • 0

    posted a message on Linux Automatic Backup (CronJob)
    Wouldn't one line suffice?

    0 * * * * /bin/cp /home/user/My\ Documents/Mine/server_level.dat /home/user/My\ Documents/Mine/backup/backup0.dat >>/tmp/backup.log 2>&1
    Posted in: Server Support and Administration
  • To post a comment, please or register a new account.