mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-12-22 17:44:00 +07:00
Moved server run scripts
This commit is contained in:
parent
179bf4d525
commit
d3c559fa00
@ -319,7 +319,7 @@ public class Administration{
|
||||
public enum Config{
|
||||
name("The server name as displayed on clients.", "Server", "servername"),
|
||||
port("The port to host on.", Vars.port),
|
||||
autoUpdate("Whether to auto-restart when a new update arrives.", false),
|
||||
autoUpdate("Whether to auto-update and exit when a new bleeding-edge update arrives.", false),
|
||||
crashReport("Whether to send crash reports.", false, "crashreport"),
|
||||
logging("Whether to log everything to files.", true),
|
||||
strict("Whether strict mode is on - corrects positions and prevents duplicate UUIDs.", true),
|
||||
|
@ -126,7 +126,7 @@ public class BeControl{
|
||||
progress -> {},
|
||||
() -> false,
|
||||
() -> {
|
||||
Log.info("&lcVersion downloaded, exiting. Note that if you are not using the run-server script, the server will not restart automatically.");
|
||||
Log.info("&lcVersion downloaded, exiting. Note that if you are not using a auto-restart script, the server will not restart automatically.");
|
||||
//replace old file with new
|
||||
dest.copyTo(source);
|
||||
dest.delete();
|
||||
|
19
server/run-jar
Executable file
19
server/run-jar
Executable 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
|
@ -4,13 +4,22 @@ if [[ $# -eq 0 ]] ; then
|
||||
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
|
||||
exit 0
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user