Answer the question
In order to leave comments, you need to log in
How to autoload sh script?
hello everyone, there is such a script
#!/bin/sh
while :;
do
java -server -Dfile.encoding=UTF-8 -Xmx6g -cp config/xml:../serverslibs/*: gameserver.GameServer > log/stdout.log 2>&1
[ $? -ne 2 ] && break
sleep 30;
done
Answer the question
In order to leave comments, you need to log in
throw out the script
and write a systemd.unit
, it will launch you and restart if the server breaks off.
and logs can be redirected to files.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question