Moved server run scripts

This commit is contained in:
Anuken
2019-12-28 17:33:17 -05:00
parent 179bf4d525
commit d3c559fa00
4 changed files with 31 additions and 3 deletions
Executable
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
if [[ $# -eq 0 ]] ; then
echo 'A server jar must be supplied as the first argument.'
exit 1
fi
if [[ ! -e $1 ]] ; then
echo "The supplied jar file '$1' must exist."
exit 1
fi
while true; do
#auto-restart until ctrl-c or exit 0
java -jar -XX:+HeapDumpOnOutOfMemoryError $1
excode=$?
if [ $excode -eq 0 ] || [ $excode -eq 130 ]; then
exit 0
fi
done
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
if [[ $# -eq 0 ]] ; then
echo 'A build version must be supplied as the first argument.'
exit 1
fi
cd ..
./gradlew server:dist -Pbuildversion=$1
excode=$?
if [ $excode -ne 0 ]; then
echo $excode
exit 1
fi
while true; do
#auto-restart until ctrl-c or exit 0
java -jar -XX:+HeapDumpOnOutOfMemoryError server/build/libs/server-release.jar
excode=$?
if [ $excode -eq 0 ] || [ $excode -eq 130 ]; then
exit 0
fi
done