From 8e2b2fe1098db8c56a2ace7478e9443486ec45ec Mon Sep 17 00:00:00 2001 From: Daniel Barton Date: Fri, 30 Jun 2023 18:47:08 +0800 Subject: [PATCH] Updates startup to resolve issues with stop action Corrects call to rcon tool - the -c flag shouldn't be there. Calls processes async and then waits on them so that signal traps can work Traps *both* SIGINT and SIGTERM to account for wings bugs --- .../egg-ark--survival-evolved.json | 47 ++++++++++++------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/game_eggs/steamcmd_servers/ark_survival_evolved/egg-ark--survival-evolved.json b/game_eggs/steamcmd_servers/ark_survival_evolved/egg-ark--survival-evolved.json index 555bfd66..4952cafc 100644 --- a/game_eggs/steamcmd_servers/ark_survival_evolved/egg-ark--survival-evolved.json +++ b/game_eggs/steamcmd_servers/ark_survival_evolved/egg-ark--survival-evolved.json @@ -1,21 +1,21 @@ { "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", "meta": { - "version": "PTDL_v1", + "version": "PTDL_v2", "update_url": null }, - "exported_at": "2021-11-26T13:48:52+01:00", + "exported_at": "2023-06-30T10:44:53+00:00", "name": "Ark: Survival Evolved", "author": "dev@shepper.fr", "description": "As a man or woman stranded, naked, freezing, and starving on the unforgiving shores of a mysterious island called ARK, use your skill and cunning to kill or tame and ride the plethora of leviathan dinosaurs and other primeval creatures roaming the land. Hunt, harvest resources, craft items, grow crops, research technologies, and build shelters to withstand the elements and store valuables, all while teaming up with (or preying upon) hundreds of other players to survive, dominate... and escape! \u2014 Gamepedia: ARK", "features": [ "steam_disk_space" ], - "images": [ - "ghcr.io\/parkervcp\/games:source" - ], + "docker_images": { + "ghcr.io\/parkervcp\/games:source": "ghcr.io\/parkervcp\/games:source" + }, "file_denylist": [], - "startup": "rmv() { echo -e \"stopping server\"; rcon -t rcon -a 127.0.0.1:${RCON_PORT} -p ${ARK_ADMIN_PASSWORD} -c saveworld && rcon -a 127.0.0.1:${RCON_PORT} -p ${ARK_ADMIN_PASSWORD} -c DoExit; }; trap rmv 15; cd ShooterGame\/Binaries\/Linux && .\/ShooterGameServer {{SERVER_MAP}}?listen?SessionName=\"{{SESSION_NAME}}\"?ServerPassword={{ARK_PASSWORD}}?ServerAdminPassword={{ARK_ADMIN_PASSWORD}}?Port={{SERVER_PORT}}?RCONPort={{RCON_PORT}}?QueryPort={{QUERY_PORT}}?RCONEnabled=True?GameModIds={{MOD_ID}}$( [ \"$BATTLE_EYE\" == \"1\" ] || printf %s ' -NoBattlEye' ) -server -automanagedmods {{ARGS}} -log & until echo \"waiting for rcon connection...\"; rcon -t rcon -a 127.0.0.1:${RCON_PORT} -p ${ARK_ADMIN_PASSWORD}; do sleep 5; done", + "startup": "rmv() { echo \"stopping server\"; rcon -t rcon -a 127.0.0.1:${RCON_PORT} -p ${ARK_ADMIN_PASSWORD} saveworld &&rcon -t rcon -a 127.0.0.1:${RCON_PORT} -p ${ARK_ADMIN_PASSWORD} DoExit && wait ${ARK_PID}; echo \"Server Closed\"; exit; }; trap rmv 15 2; cd ShooterGame\/Binaries\/Linux && .\/ShooterGameServer {{SERVER_MAP}}?listen?SessionName=\"{{SESSION_NAME}}\"?ServerPassword={{ARK_PASSWORD}}?ServerAdminPassword={{ARK_ADMIN_PASSWORD}}?Port={{SERVER_PORT}}?RCONPort={{RCON_PORT}}?QueryPort={{QUERY_PORT}}?RCONEnabled=True?GameModIds={{MOD_ID}}$( [ \"$BATTLE_EYE\" == \"1\" ] || printf %s ' -NoBattlEye' ) -server -automanagedmods {{ARGS}} -log & ARK_PID=$! ; until echo \"waiting for rcon connection...\"; (rcon -t rcon -a 127.0.0.1:${RCON_PORT} -p ${ARK_ADMIN_PASSWORD})<\/proc\/$$\/fd\/0 & wait $!; do sleep 5; done", "config": { "files": "{}", "startup": "{\r\n \"done\": \"Waiting commands for 127.0.0.1:\"\r\n}", @@ -37,7 +37,8 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "nullable|alpha_dash|between:1,100" + "rules": "nullable|alpha_dash|between:1,100", + "field_type": "text" }, { "name": "Admin Password", @@ -46,7 +47,8 @@ "default_value": "PleaseChangeMe", "user_viewable": true, "user_editable": true, - "rules": "required|alpha_dash|between:1,100" + "rules": "required|alpha_dash|between:1,100", + "field_type": "text" }, { "name": "Server Map", @@ -55,7 +57,8 @@ "default_value": "TheIsland", "user_viewable": true, "user_editable": true, - "rules": "required|string|max:20" + "rules": "required|string|max:20", + "field_type": "text" }, { "name": "Server Name", @@ -64,7 +67,8 @@ "default_value": "A Pterodactyl Hosted ARK Server", "user_viewable": true, "user_editable": true, - "rules": "required|string|max:128" + "rules": "required|string|max:128", + "field_type": "text" }, { "name": "Rcon Port", @@ -73,7 +77,8 @@ "default_value": "27020", "user_viewable": true, "user_editable": true, - "rules": "required|numeric" + "rules": "required|numeric", + "field_type": "text" }, { "name": "Query Port", @@ -82,7 +87,8 @@ "default_value": "27015", "user_viewable": true, "user_editable": true, - "rules": "required|numeric" + "rules": "required|numeric", + "field_type": "text" }, { "name": "Auto-update server", @@ -91,7 +97,8 @@ "default_value": "0", "user_viewable": true, "user_editable": true, - "rules": "required|boolean" + "rules": "required|boolean", + "field_type": "text" }, { "name": "Battle Eye", @@ -100,7 +107,8 @@ "default_value": "1", "user_viewable": true, "user_editable": true, - "rules": "required|boolean" + "rules": "required|boolean", + "field_type": "text" }, { "name": "Mods", @@ -109,7 +117,8 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "nullable|string" + "rules": "nullable|string", + "field_type": "text" }, { "name": "App ID", @@ -118,7 +127,8 @@ "default_value": "376030", "user_viewable": true, "user_editable": false, - "rules": "nullable|numeric" + "rules": "nullable|numeric", + "field_type": "text" }, { "name": "Additional Arguments", @@ -127,7 +137,8 @@ "default_value": "", "user_viewable": true, "user_editable": true, - "rules": "nullable|string" + "rules": "nullable|string", + "field_type": "text" } ] -} +} \ No newline at end of file