Script to setup/manage CraftBukkit server on linux.
___ _ _ _ _ ___ _ _
| _ )_ _| |_| |_(_) |_| _ ) ___ ___| |_ __| |_ _ _ __ _ _ __
| _ \ || | / / / / | _| _ \/ _ \/ _ \ _(_-< _| '_/ _` | '_ \
|___/\_,_|_\_\_\_\_|\__|___/\___/\___/\__/__/\__|_| \__,_| .__/
|_|
- Install bukkit server from rb/beta/dev channels.
- Update from rb/beta/dev channels.
- Manage bukkit server with tmux session.
- Remap
Ctrl+c
key to prevent killing bukkit server. - Control script with convenient functions(see below).
cd ~/
git clone https://github.com/marlboromoo/bukkit_bootstrap.git
cd bukkit_bootstrap
./bootstrap.sh install
Edit config/setting.sh
if needed:
INSTALL_PATH
: path to install CraftBukkitCRAFTBUKKIT_CHANNEL
: which channel to use (cb, beta, dev)PURGE_INSTALL
: delete the old installation path instead of rename itUSE_SCRREN_PREFIX
: use 'C-a' instead of 'C-b'TMUX_SESSION
: session name of tmuxJAVA_OPT
: java option to launch CraftBukkit server
Control script for bukkit server.
~/craftbukkit/craftbukkit.sh
Usage: craftbukkit.sh [CMD]
Available CMDs:
start Start bukkit server.
attach Attach bukkit server console.
console Alias for attach.
stop Stop bukkit server. (graceful)
restart Restart bukkit server. (graceful)
kill Kill the bukkit server.
cmd "MY COMMAND" Send command to bukkit server.
plainlog "LOGFILE" Strip color code from log file.
update Perform update if available. (need restart)
force-update Force update (need restart).
check-update Check if update available.
log-rotate Log rotate.
regen-end Regenerate world: THE END. (need restart)
remake-world Regenerate worlds and keep old worlds. (need restart)
purge-world Regenerate worlds. (need restart)
You can regenerate the craftbukkit.sh
after modifying configs or updating from this repository.
cd ~/bukkit_bootstrap
git pull
./bootstrap update-script
Add follow settings in /etc/crontab
.
# m h dom mon dow user command
59 23 * * * minecraft /home/minecraft/craftbukkit/craftbukkit.sh log-rotate
51 0 * * * minecraft /home/minecraft/craftbukkit/craftbukkit.sh cmd "say Server will restart in 10 minute."
56 0 * * * minecraft /home/minecraft/craftbukkit/craftbukkit.sh cmd "say Server will restart in 5 minute."
0 1 * * * minecraft /home/minecraft/craftbukkit/craftbukkit.sh cmd "say Server will restart in 1 minute."
1 1 * * * minecraft /home/minecraft/craftbukkit/craftbukkit.sh regen-end
#1 1 * * * minecraft /home/minecraft/craftbukkit/craftbukkit.sh restart
- Support other linux distributions. (current only Ubuntu)
- Colorful output
- Report server status
- Update plugins
- Email notification
- Timeout settings (stop server/?)
- ...
Timothy.Lee a.k.a MarlboroMoo.
Released under the [MIT License] 5.