2021-03-21 14:04:57 +00:00
|
|
|
#!
|
2021-06-27 17:35:05 +00:00
|
|
|
|
|
|
|
#Pull in the .env file for variables.
|
|
|
|
source .env.sh
|
|
|
|
|
|
|
|
if test -f "$RESET_FILE";
|
2021-03-21 14:04:57 +00:00
|
|
|
then
|
2021-06-27 17:35:05 +00:00
|
|
|
echo "CRITICAL ERORR - Server is currently re-setting. Please wait for this action to complete."
|
2021-06-27 19:36:52 +00:00
|
|
|
exit 1
|
2021-03-21 14:04:57 +00:00
|
|
|
else
|
2021-06-27 17:35:05 +00:00
|
|
|
if screen -list | grep -q "$SCREEN_NAME";
|
|
|
|
then
|
|
|
|
echo "ERROR - There is an instance of the server already running. Make sure it is killed first and try again"
|
2021-06-27 19:36:52 +00:00
|
|
|
exit 1
|
2021-06-27 17:35:05 +00:00
|
|
|
else
|
2021-06-27 17:48:41 +00:00
|
|
|
screen -dmS $SCREEN_NAME java -Xms$JVM_HEAP -Xmx$JVM_HEAP $JVM_LAUNCH_OPTS -jar $PAPER_JAR_NAME
|
2021-06-27 17:35:05 +00:00
|
|
|
echo "Server Started"
|
|
|
|
fi
|
2021-03-21 14:04:57 +00:00
|
|
|
fi
|