From 36a3896c664e47db3199f8e4b08948d145852faf Mon Sep 17 00:00:00 2001 From: N07070 Date: Wed, 30 Jul 2014 15:35:18 +0200 Subject: [PATCH] Adding the bash script, plus the default icon. Adding the bash script, plus the default icon. --- server-icon.png | Bin 0 -> 7001 bytes start_server.sh | 73 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 server-icon.png create mode 100755 start_server.sh diff --git a/server-icon.png b/server-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..68352267f0accf690ca5a742776edda90246c64f GIT binary patch literal 7001 zcmV-f8>ZxmP)_rCA_zWZwj!Ru4%_=Y+P_``qs>Nus2JJj*0qyGB~b$nMHPCOGwVW5Cab0)Yn zrcOEzeBU>BJL=C@f3bKBzNgN6d=gH~iQGfe_-=5Y6L-Sd)mSnnUnl2ikeFUxI2j*2 zjvxF+bMv)yp5}M-c{N5X5raq9dch$4yZYzWTr7<*p>(EX)}&r#b=*w1A5%wP`^D|p z`0OU0Ntucl7c0|NORF+xq?RXxPg!8No1I%HzL#|hruiVMH)2lu#M zz&Ih&*9?q<$75coIfNO0%?~%h4+x|0G7qgYkxL+!3Fe2ZPRD#RAFoBtxpaC7qmPf` z?2Bh*>=QJ-mubm37yskMAO!H_Ni|R`X1Ey7CU|DQ5)Q}+(7O@O#o<-FfY7Ro+ENYm zr8*Ns*LZb5*vy2(gwihfvP%|91VuJVn7~B9Y+?j$0N?M@xLz6#Ew2WienES1KD?<;6Hj2i3VM zYQ-8aggDIH*Gv=G3SqP`fvW5x?~J;am}!tk=0SPB+MMy#v z8ViF3jQw&9hweWVFre=PeHi%2Krpc%C?8T{#j&D+u@Gi7wm_N)jmHes_;W10hQ5nj z8#IVDrXwC)OHAVH^teW!(EN-l&uDYr2+=bRBA-Q6Y%yRRBKN6t4ebq>esvndyN5#t zY`AGdU_P{VoqJ<0BA;Tj8REWg%$R|_A3#jtEZ2)|XT|A+=!zgF7WEs%Wid$S z$#}kR^o4C&<=u>t2t~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Z0eT~ zYeHh{VJkcNVFz5&5oS6}tX@G$fKcpGU#bO8kFxoZo?^9L5?#Z9p7-}~pI~{m3}<)_ ztCWkFRx)$uk`C1JDYM(G12pt0DZ=o#(NNdAA{FQg3W(S<(_P%sRvYQ=s)x}U-6!VI z&I+3_+CgXuG~wJDCxMP~;OMBA>g?(gk@B>gi6-^jqy&jMffcyE7yT+C^wn$Qqa@H~E1^m{3=CRvv+q4zFNG!agAT=?;0Gi1Q4oc!;J% z*cxX)Uqts*m9?rXWk^brD%$*%!LYNG-uV?K|NlYqi6oV&Ai8wB$E!V?m5#>p*x|Qt} zB`4+e6-AR^$L%lSwSi)Q=@2EfkV&L?K)q&ZSgJ@|N>h+Mr5+l#;c9}+sU<8ZC1|p< z7J-KQSg}a?Xazt_Xt^Hl#ERz7Hyy)Ln)b^)u(6`Y&`yo7JSWLiR-At1*MFeP*Qw(f rb@W<8IQT<-1x_SA4EZB<{LTLZBm9NUr;gg<00000NkvXXu0mjfeeP(N literal 0 HcmV?d00001 diff --git a/start_server.sh b/start_server.sh new file mode 100755 index 0000000..583c41d --- /dev/null +++ b/start_server.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +cd "$( dirname "$0" )" + +echo "======================================================" +echo ">> Script for creating a Minecraft server in OS X" +echo ">> Version 0.5 - 30/07/2014" +echo ">> (c) 2014 N07070 - Licenced under GPL 3.0" +echo ">> * Please contact @_007N_ on twitter for bug report." +echo ">> If you need help, type ./start_server.sh -h " +echo "======================================================" +sleep 1.3 +clear + +#This function runs to check if the directory has everything the server needs. +function first_run() { + if [[ -d Backups/ ]] && [[ -e "minecraft_server.jar" ]] && [[ -e "server-icon.png" ]]; then + echo ">> Everything seems okay to run the server !" + clear + else + echo -e ">> I will now create a directory for backups, the jar for the server and an icon for your server. \a" + mkdir Backups/ + echo -e ">> I'm done making the backup directory. \a" + wget --progress=bar https://s3.amazonaws.com/Minecraft.Download/versions/1.7.10/minecraft_server.1.7.10.jar -O minecraft_server.jar + echo -e ">> I'm done downloading the server .jar . \a" + wget http://www.rw-designer.com/icon-image/5547-64x64x8.png -O server-icon.png + echo -e ">> I'm done downloading the server icon. \a" + clear + fi +} + +#This function runs the server. +function run_server() { + first_run + echo ">> I'm removing the old backup" + rm -r Backups/Backup.tar.gz + clear + echo ">> I'm removing the old logs.." + rm -r logs + clear + echo ">> I'm saving the world to a new backup" + tar -zcf Backups/Backup.tar.gz world/ + clear + echo ">> I've finished saving the world, I will now start the server !" + clear + echo ">> Lancement du serveur Minecraft en cours..." + clear + say "Minecraft is up and running !" + java -Xms2G -Xmx2G -jar minecraft_server.jar -o --nogui + echo ">> ArrĂȘt du serveur fini. " +} + +function show_help() { + echo ">> Welcome to the server installation script." + echo ">> This script supports one option:" + echo ">> -h or --help Show this help page." +} + +if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then + show_help + read -p "Press [Enter] to continue..." +elif [ "$1" == "-k" ]; then + echo "" +else + echo ">> Before starting the script, you need to know a few things:" + echo ">> * You will need to provide your server icon." + echo ">> * You will need to accept the EULA for the server to run." + echo ">> * The script deletes the logs and the backups made on the previous run, for space." + echo ">> * You can skip this part as of now by strating the script with the -k argument." + read -p "Press [Enter] key to start the script..." +fi + +run_server \ No newline at end of file