Hi,
Would it be possible to add something like this to ServerStart.sh
The idea is when starting the server after an upgrade it runs with -Dfml.queryResult=confirm the first time.
The script I use to upgrade is:
Thanks
Duncan
Would it be possible to add something like this to ServerStart.sh
Code:
--- ServerStart.sh.orig 2015-06-23 15:32:46.000000000 +0200
+++ ServerStart.sh 2015-07-31 08:47:10.408960353 +0200
@@ -2,6 +2,7 @@
cd "$(dirname "$0")"
+FTB_DEFS=$1
# makes things easier if script needs debugging
if [ x$FTB_VERBOSE = xyes ]; then
@@ -20,6 +21,7 @@
if [ ! -f minecraft_server.1.7.10.jar ]; then
echo "Missing required jars. Running install script!"
sh ./FTBInstall.sh
+ FTB_DEFS=-Dfml.queryResult=confirm
fi
# check if there is eula.txt and if it has correct content
@@ -39,5 +41,5 @@
fi
echo "Starting server"
-java -server -Xms512m -Xmx2048M -XX:PermSize=256m -d64 -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -jar FTBServer-1.7.10-1448.jar nogui
-echo "Server process finished"
\ No newline at end of file
+java -server -Xms512m -Xmx4096M -XX:PermSize=512m -d64 -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -jar ${FTB_DEFS} FTBServer-1.7.10-1448.jar nogui
+echo "Server process finished"
The idea is when starting the server after an upgrade it runs with -Dfml.queryResult=confirm the first time.
The script I use to upgrade is:
Code:
OLDVER=1.7-1.8.2
NEWVER=1.7-1.9.0
pkill java
cd /usr/local/minecraft/
mv /tmp/FTBInfinityServer.zip FTBInfinityServer-${NEWVER}.zip
mv infinity infinity-${OLDVER}
mkdir infinity
cd infinity
mkdir -p config/JourneyMapServer/
unzip ../FTBInfinityServer-${NEWVER}.zip
/bin/cp -ax ../infinity-${OLDVER}/world .
/bin/cp ../infinity-${OLDVER}/eula.txt .
/bin/cp ../infinity-${OLDVER}/server.properties .
/bin/cp ../infinity-${OLDVER}/config/JourneyMapServer/world.cfg config/JourneyMapServer/
JSON="banned-ips.json banned-players.json ops.json usercache.json version.json whitelist.json"
for i in ${JSON}; do
/bin/cp -v ../infinity-${OLDVER}/$i .
done
/bin/rm *.bat -v
/bin/chmod -v +x *.sh
/bin/mv ServerStart.sh ServerStart.sh.orig
/bin/cp /usr/local/minecraft/infinity-${OLDVER}/ServerStart.sh .
./ServerStart.sh
Thanks
Duncan