by
1
4
1,688
21
Top 1% !
Popular
Famous
Specified
Popularity: 14446th place
Created
Modified Dec 28, 2013
This snippet is Public
No tags for this snippet yet.
LanguageShell
LicenseMIT_X11
SourceGithub

MCPC+ Startup Script (w/ Auto Restart)

MCPC+ Startup Script (w/ Auto Restart): 
start.sh
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/16289/MCPC--Startup-Script-(w--Auto-Restart)?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
#!/bin/sh # Current path MC_PATH=$(dirname "$(readlink -fn "$0")") # Minecraft version MC_VERSION='1.6.4' # Minecraft port MC_PORT=$(grep server-port $MC_PATH/server.properties | cut -d '=' -f 2) # CPU cores CPU_COUNT=2 # Memory MEMORY_OPTS='-Xmx4G -Xms4G' # PermSize PERMSIZE='256' PERMSIZE_OPTS="-XX:MaxPermSize=${PERMSIZE}m -XX:PermSize=${PERMSIZE}m" # Java garbage collection JAVA_OPTS="-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -XX:ParallelGCThreads=${CPU_COUNT}" # MCPC+ VERSION='R2.1-forge965-B192' SERVICE="mcpc-plus-${MC_VERSION}-${VERSION}.jar" # Forge #VERSION='9.11.1.953' #SERVICE="minecraftforge-universal-${MC_VERSION}-${VERSION}.jar" # # Launch server while true do cd "$MC_PATH" java -d64 $PERMSIZE_OPTS $MEMORY_OPTS $JAVA_OPTS -Djava.awt.headless=true -jar $SERVICE nogui echo Restarting server in 5... sleep 5 done
If you want to be updated about similar snippets, Sign in and follow our Channels
Originally posted on https://gist.github.com/8162584