server/minecraft: Added launch script

dehydrated
Felix Stupp 5 years ago
parent f5bd293d83
commit 8643456bd9
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -9,6 +9,7 @@ installation_directory: "{{ user_directory }}/bin"
mcrcon_directory: "{{ user_directory }}/mcrcon" mcrcon_directory: "{{ user_directory }}/mcrcon"
data_directory: "{{ user_directory }}/data" data_directory: "{{ user_directory }}/data"
remote_control_script: "{{ user_directory }}/cmd" remote_control_script: "{{ user_directory }}/cmd"
launch_script: "{{ user_directory }}/launch"
# minecraft_version: "1.10" # for naming # minecraft_version: "1.10" # for naming
minecraft_source_link_generator: "curl --silent https://mcversions.net | grep minecraft_server-{{ minecraft_version }}.jar | grep --only-matching --perl-regexp '(?<=\")https://launcher.mojang.com/[^\"]+(?=\")'" minecraft_source_link_generator: "curl --silent https://mcversions.net | grep minecraft_server-{{ minecraft_version }}.jar | grep --only-matching --perl-regexp '(?<=\")https://launcher.mojang.com/[^\"]+(?=\")'"

@ -77,6 +77,8 @@
group: "{{ system_user }}" group: "{{ system_user }}"
mode: "u=rx,g=r,o=" mode: "u=rx,g=r,o="
loop: loop:
- name: "launch.sh"
path: "{{ launch_script }}"
- name: "control.sh" - name: "control.sh"
path: "{{ remote_control_script }}" path: "{{ remote_control_script }}"

@ -0,0 +1,2 @@
#!/bin/sh
/usr/lib/jvm/java-{{ java_version }}-openjdk-amd64/bin/java -Xms{{ minecraft_start_ram | quote }} -Xmx{{ minecraft_max_ram | quote }} -jar {{ installation_directory | quote }}/server.jar nogui
Loading…
Cancel
Save