24 lines
454 B
Bash
24 lines
454 B
Bash
|
#! /bin/sh
|
||
|
#
|
||
|
# start-server.sh
|
||
|
# Copyright (C) 2021 Vintage Salt <rehashedsalt@cock.li>
|
||
|
#
|
||
|
# Distributed under terms of the MIT license.
|
||
|
#
|
||
|
|
||
|
# Entrypoint will be server.jar
|
||
|
args="-jar server.jar nogui"
|
||
|
|
||
|
# Memory configuration
|
||
|
[ -n "$JRE_XMX" ] && args="-Xmx$JRE_XMX $args"
|
||
|
[ -n "$JRE_XMS" ] && args="-Xms$JRE_XMS $args"
|
||
|
[ -n "$ARGS" ] && args="$ARGS $args"
|
||
|
|
||
|
# Debugging info
|
||
|
java -version
|
||
|
echo "Invoking java with args: $args"
|
||
|
|
||
|
# Start 'er up
|
||
|
java $args
|
||
|
|