Compare commits
2 commits
99d8b06d6c
...
0e63541479
Author | SHA1 | Date | |
---|---|---|---|
|
0e63541479 | ||
|
22527d6b5e |
2 changed files with 8 additions and 17 deletions
8
bin/launch-minecraft-server
Executable file
8
bin/launch-minecraft-server
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh -ex
|
||||
|
||||
# Se déplacer dans le dossier du serveur
|
||||
cd "/srv/minecraft/servers/${1}"
|
||||
|
||||
# Exécution
|
||||
sudo -u minecraft screen ./start.sh
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# cd to the server dir
|
||||
cd "$(dirname "$(readlink -f "$0")")" || exit
|
||||
|
||||
# Variables
|
||||
min_ram=1G
|
||||
max_ram=4G
|
||||
server_jar=
|
||||
|
||||
# Execution
|
||||
exec screen java \
|
||||
"-Xms${min_ram}" \
|
||||
"-Xmx${max_ram}" \
|
||||
-jar "$server_jar" \
|
||||
nogui
|
||||
|
Loading…
Reference in a new issue