From eb58300a7ea24f5eea403d54bf74961a497c403f Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Wed, 7 Sep 2022 18:16:06 +0200 Subject: [PATCH 1/9] update veloren --- game_eggs/veloren/egg-veloren.json | 61 +++++++++++++++++++++++++----- game_eggs/veloren/settings.ron | 20 ---------- 2 files changed, 51 insertions(+), 30 deletions(-) delete mode 100644 game_eggs/veloren/settings.ron diff --git a/game_eggs/veloren/egg-veloren.json b/game_eggs/veloren/egg-veloren.json index d4bda0d7..2c3ec6d1 100644 --- a/game_eggs/veloren/egg-veloren.json +++ b/game_eggs/veloren/egg-veloren.json @@ -1,31 +1,72 @@ { "_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-07-02T04:27:30+03:00", + "exported_at": "2022-09-07T18:12:29+02:00", "name": "Veloren", "author": "parker@parkervcp.com", "description": "Veloren is a multiplayer voxel RPG written in Rust. It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft.", "features": null, - "images": [ - "quay.io\/parkervcp\/pterodactyl-images:base_debian" - ], + "docker_images": { + "DEBIAN": "ghcr.io\/parkervcp\/yolks:debian" + }, "file_denylist": [], "startup": ".\/veloren-server-cli", "config": { - "files": "{\r\n \"userdata\/server\/server_config\/settings.ron\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" gameserver_address\": \" gameserver_address: \\\"0.0.0.0:{{server.build.default.port}}\\\",\",\r\n\t \" server_name\": \" server_name: \\\"{{server.build.env.SERVER_NAME}}\\\",\"\r\n }\r\n }\r\n}", + "files": "{\r\n \"userdata\/server\/server_config\/settings.ron\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" gameserver_address\": \" gameserver_address: \\\"0.0.0.0:{{server.build.default.port}}\\\",\",\r\n \" metrics_address\": \" metrics_address: \\\"0.0.0.0:{{server.build.env.METRICS_PORT}}\\\",\",\r\n \" server_name\": \" server_name: \\\"{{server.build.env.SERVER_NAME}}\\\",\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \"Server is ready to accept connections\"\r\n}", "logs": "{}", "stop": "shutdown graceful 10" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl git-lfs\r\n\r\nmkdir -p \/mnt\/server\/assets\r\n\r\ncd \/tmp.\r\n\r\ngit clone https:\/\/gitlab.com\/veloren\/veloren.git\r\n\r\n## build veloran server cli\r\nexport VELOREN_USERDATA_STRATEGY=executable\r\ncd veloren\r\necho -e \"building veloran server, this is gonna take a bit\" \r\ncargo build --bin veloren-server-cli --release\r\n\r\ncp -f target\/release\/veloren-server-cli \/mnt\/server\/\r\ncp -Rf assets\/{common,server,world} \/mnt\/server\/assets\/\r\n\r\n## get config from repo because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n echo -e \"getting default config from git repo\"\r\n curl -sSL https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/veloren\/settings.ron > \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n echo -e \"config pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", - "container": "rust:slim-buster", + "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMARCH_AND_SPACES=$(echo ${VERSION} && echo ${ARCH} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MARCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\necho ${MATCH}\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"invalid ${RELEASE_DATE}\"\r\n fi\r\nfi\r\n\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n echo -e \"creating default config\"\r\n echo -n \"(\r\n gameserver_address: \"0.0.0.0:14004\",\r\n metrics_address: \"0.0.0.0:14005\",\r\n auth_server_address: Some(\"https:\/\/auth.veloren.net\"),\r\n max_players: 100,\r\n world_seed: 25269,\r\n server_name: \"Veloren Alpha\",\r\n start_time: 32400,\r\n map_file: None,\r\n max_view_distance: Some(65),\r\n banned_words_files: [],\r\n max_player_group_size: 6,\r\n client_timeout: (\r\n secs: 40,\r\n nanos: 0,\r\n ),\r\n spawn_town: None,\r\n safe_spawn: true,\r\n max_player_for_kill_broadcast: Some(20),\r\n)\r\n\" > \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n echo -e \"config pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", + "container": "debian:bullseye-slim", "entrypoint": "bash" } }, - "variables": [] -} + "variables": [ + { + "name": "Version", + "description": "The version you want weekly or nightly", + "env_variable": "VERSION", + "default_value": "weekly", + "user_viewable": false, + "user_editable": false, + "rules": "required|string|in:weekly,nightly", + "field_type": "text" + }, + { + "name": "Release date", + "description": "The date of the version you want look here:\r\nhttps:\/\/github.com\/veloren\/veloren\/releases\r\n\r\neverything after the x86_64 but not the first -\r\nand not the .zip extention\r\n\r\nexample:\r\n2022-08-31T08_26", + "env_variable": "RELEASE_DATE", + "default_value": "2022-08-31T08_26", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:40", + "field_type": "text" + }, + { + "name": "Server name", + "description": "The name your server will be displaying", + "env_variable": "SERVER_NAME", + "default_value": "A ptero hosted server", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:64", + "field_type": "text" + }, + { + "name": "Metrics port", + "description": "Game port +1", + "env_variable": "METRICS_PORT", + "default_value": "14005", + "user_viewable": true, + "user_editable": false, + "rules": "required|integer", + "field_type": "text" + } + ] +} \ No newline at end of file diff --git a/game_eggs/veloren/settings.ron b/game_eggs/veloren/settings.ron deleted file mode 100644 index 7d59fda2..00000000 --- a/game_eggs/veloren/settings.ron +++ /dev/null @@ -1,20 +0,0 @@ -( - gameserver_address: "0.0.0.0:14004", - metrics_address: "0.0.0.0:14005", - auth_server_address: Some("https://auth.veloren.net"), - max_players: 100, - world_seed: 25269, - server_name: "Veloren Alpha", - start_time: 32400, - map_file: None, - max_view_distance: Some(65), - banned_words_files: [], - max_player_group_size: 6, - client_timeout: ( - secs: 40, - nanos: 0, - ), - spawn_town: None, - safe_spawn: true, - max_player_for_kill_broadcast: None, -) \ No newline at end of file From d08b58571da8a058b17672ae4e68e928d1726159 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Fri, 30 Sep 2022 18:19:27 +0200 Subject: [PATCH 2/9] fix config file download + set Release date var to current newest --- game_eggs/veloren/egg-veloren.json | 6 +++--- game_eggs/veloren/settings.ron | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 game_eggs/veloren/settings.ron diff --git a/game_eggs/veloren/egg-veloren.json b/game_eggs/veloren/egg-veloren.json index 2c3ec6d1..0999c29c 100644 --- a/game_eggs/veloren/egg-veloren.json +++ b/game_eggs/veloren/egg-veloren.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-09-07T18:12:29+02:00", + "exported_at": "2022-09-30T18:17:45+02:00", "name": "Veloren", "author": "parker@parkervcp.com", "description": "Veloren is a multiplayer voxel RPG written in Rust. It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft.", @@ -22,7 +22,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMARCH_AND_SPACES=$(echo ${VERSION} && echo ${ARCH} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MARCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\necho ${MATCH}\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"invalid ${RELEASE_DATE}\"\r\n fi\r\nfi\r\n\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n echo -e \"creating default config\"\r\n echo -n \"(\r\n gameserver_address: \"0.0.0.0:14004\",\r\n metrics_address: \"0.0.0.0:14005\",\r\n auth_server_address: Some(\"https:\/\/auth.veloren.net\"),\r\n max_players: 100,\r\n world_seed: 25269,\r\n server_name: \"Veloren Alpha\",\r\n start_time: 32400,\r\n map_file: None,\r\n max_view_distance: Some(65),\r\n banned_words_files: [],\r\n max_player_group_size: 6,\r\n client_timeout: (\r\n secs: 40,\r\n nanos: 0,\r\n ),\r\n spawn_town: None,\r\n safe_spawn: true,\r\n max_player_for_kill_broadcast: Some(20),\r\n)\r\n\" > \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n echo -e \"config pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", + "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMARCH_AND_SPACES=$(echo ${VERSION} && echo ${ARCH} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MARCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\necho ${MATCH}\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"invalid ${RELEASE_DATE}\"\r\n fi\r\nfi\r\n\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n wget https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/veloren\/settings.ron -O \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n echo \"config file pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", "container": "debian:bullseye-slim", "entrypoint": "bash" } @@ -42,7 +42,7 @@ "name": "Release date", "description": "The date of the version you want look here:\r\nhttps:\/\/github.com\/veloren\/veloren\/releases\r\n\r\neverything after the x86_64 but not the first -\r\nand not the .zip extention\r\n\r\nexample:\r\n2022-08-31T08_26", "env_variable": "RELEASE_DATE", - "default_value": "2022-08-31T08_26", + "default_value": "2022-09-26T13_34", "user_viewable": true, "user_editable": true, "rules": "required|string|max:40", diff --git a/game_eggs/veloren/settings.ron b/game_eggs/veloren/settings.ron new file mode 100644 index 00000000..a73936c7 --- /dev/null +++ b/game_eggs/veloren/settings.ron @@ -0,0 +1,20 @@ +( + gameserver_address: "0.0.0.0:14004", + metrics_address: "0.0.0.0:14005", + auth_server_address: Some("https://auth.veloren.net"), + max_players: 100, + world_seed: 25269, + server_name: "Veloren Alpha", + start_time: 32400, + map_file: None, + max_view_distance: Some(65), + banned_words_files: [], + max_player_group_size: 6, + client_timeout: ( + secs: 40, + nanos: 0, + ), + spawn_town: None, + safe_spawn: true, + max_player_for_kill_broadcast: Some(20), +) From 03dc87e5bdd74053a8d8db3b2edafb3bf3859be4 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Fri, 30 Sep 2022 18:27:39 +0200 Subject: [PATCH 3/9] Veloren move settings.rcon to new format --- game_eggs/veloren/settings.ron | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/game_eggs/veloren/settings.ron b/game_eggs/veloren/settings.ron index a73936c7..85807994 100644 --- a/game_eggs/veloren/settings.ron +++ b/game_eggs/veloren/settings.ron @@ -1,20 +1,36 @@ ( - gameserver_address: "0.0.0.0:14004", - metrics_address: "0.0.0.0:14005", + gameserver_protocols: [ + Tcp( + address: "[::]:25568", + ), + Tcp( + address: "0.0.0.0:25568", + ), + ], + metrics_address: "0.0.0.0:25569", auth_server_address: Some("https://auth.veloren.net"), max_players: 100, - world_seed: 25269, - server_name: "Veloren Alpha", - start_time: 32400, + world_seed: 230, + server_name: "A ptero hosted server", + start_time: 32400.0, map_file: None, max_view_distance: Some(65), - banned_words_files: [], max_player_group_size: 6, client_timeout: ( secs: 40, nanos: 0, ), spawn_town: None, - safe_spawn: true, - max_player_for_kill_broadcast: Some(20), -) + max_player_for_kill_broadcast: None, + calendar_mode: Auto, + gameplay: ( + battle_mode: Global(PvP), + safe_spawn: false, + explosion_burn_marks: true, + ), + moderation: ( + banned_words_files: [], + automod: false, + admins_exempt: true, + ), +) \ No newline at end of file From 0f8574c34309e5962a3fbc831a11048010d46f71 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Fri, 30 Sep 2022 18:44:15 +0200 Subject: [PATCH 4/9] remove download config file just coppy the exapmle and fix the reinstall issue with the -o flag for unzip --- game_eggs/veloren/egg-veloren.json | 6 ++--- game_eggs/veloren/settings.ron | 36 ------------------------------ 2 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 game_eggs/veloren/settings.ron diff --git a/game_eggs/veloren/egg-veloren.json b/game_eggs/veloren/egg-veloren.json index 0999c29c..91b51a70 100644 --- a/game_eggs/veloren/egg-veloren.json +++ b/game_eggs/veloren/egg-veloren.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-09-30T18:17:45+02:00", + "exported_at": "2022-09-30T18:42:39+02:00", "name": "Veloren", "author": "parker@parkervcp.com", "description": "Veloren is a multiplayer voxel RPG written in Rust. It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft.", @@ -15,14 +15,14 @@ "file_denylist": [], "startup": ".\/veloren-server-cli", "config": { - "files": "{\r\n \"userdata\/server\/server_config\/settings.ron\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" gameserver_address\": \" gameserver_address: \\\"0.0.0.0:{{server.build.default.port}}\\\",\",\r\n \" metrics_address\": \" metrics_address: \\\"0.0.0.0:{{server.build.env.METRICS_PORT}}\\\",\",\r\n \" server_name\": \" server_name: \\\"{{server.build.env.SERVER_NAME}}\\\",\"\r\n }\r\n }\r\n}", + "files": "{\r\n \"userdata\/server\/server_config\/settings.ron\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" address\": \" address: \\\"0.0.0.0:{{server.build.default.port}}\\\",\",\r\n \" metrics_address\": \" metrics_address: \\\"0.0.0.0:{{server.build.env.METRICS_PORT}}\\\",\",\r\n \" server_name\": \" server_name: \\\"{{server.build.env.SERVER_NAME}}\\\",\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \"Server is ready to accept connections\"\r\n}", "logs": "{}", "stop": "shutdown graceful 10" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMARCH_AND_SPACES=$(echo ${VERSION} && echo ${ARCH} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MARCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\necho ${MATCH}\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"invalid ${RELEASE_DATE}\"\r\n fi\r\nfi\r\n\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n wget https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/veloren\/settings.ron -O \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n echo \"config file pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", + "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMARCH_AND_SPACES=$(echo ${VERSION} && echo ${ARCH} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MARCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\necho ${MATCH}\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"invalid ${RELEASE_DATE}\"\r\n fi\r\nfi\r\n\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip -o files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n cp \/mnt\/server\/userdata\/server\/server_config\/settings.template.ron \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n echo \"config file pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", "container": "debian:bullseye-slim", "entrypoint": "bash" } diff --git a/game_eggs/veloren/settings.ron b/game_eggs/veloren/settings.ron deleted file mode 100644 index 85807994..00000000 --- a/game_eggs/veloren/settings.ron +++ /dev/null @@ -1,36 +0,0 @@ -( - gameserver_protocols: [ - Tcp( - address: "[::]:25568", - ), - Tcp( - address: "0.0.0.0:25568", - ), - ], - metrics_address: "0.0.0.0:25569", - auth_server_address: Some("https://auth.veloren.net"), - max_players: 100, - world_seed: 230, - server_name: "A ptero hosted server", - start_time: 32400.0, - map_file: None, - max_view_distance: Some(65), - max_player_group_size: 6, - client_timeout: ( - secs: 40, - nanos: 0, - ), - spawn_town: None, - max_player_for_kill_broadcast: None, - calendar_mode: Auto, - gameplay: ( - battle_mode: Global(PvP), - safe_spawn: false, - explosion_burn_marks: true, - ), - moderation: ( - banned_words_files: [], - automod: false, - admins_exempt: true, - ), -) \ No newline at end of file From 534a25fce53f5edefaadea7efeda85c1157fb447 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Fri, 30 Sep 2022 19:33:04 +0200 Subject: [PATCH 5/9] Do it this way --- game_eggs/veloren/egg-veloren.json | 18 +++++++-------- game_eggs/veloren/settings.ron | 36 ++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 game_eggs/veloren/settings.ron diff --git a/game_eggs/veloren/egg-veloren.json b/game_eggs/veloren/egg-veloren.json index 91b51a70..7b90e24c 100644 --- a/game_eggs/veloren/egg-veloren.json +++ b/game_eggs/veloren/egg-veloren.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-09-30T18:42:39+02:00", + "exported_at": "2022-09-30T19:32:46+02:00", "name": "Veloren", "author": "parker@parkervcp.com", "description": "Veloren is a multiplayer voxel RPG written in Rust. It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft.", @@ -22,7 +22,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMARCH_AND_SPACES=$(echo ${VERSION} && echo ${ARCH} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MARCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\necho ${MATCH}\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"invalid ${RELEASE_DATE}\"\r\n fi\r\nfi\r\n\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip -o files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n cp \/mnt\/server\/userdata\/server\/server_config\/settings.template.ron \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n echo \"config file pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", + "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux-x86_64\" || echo \"linux-aarch64\")\r\nPART=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMATCH_AND_SPACES=$(echo \"weekly\" && echo ${PART} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MATCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n echo -e \"weekly\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"${ARCH}\" | tail -n 1)\r\nelif [ \"${VERSION}\" == \"nightly\" ]; then\r\n echo -e \"nightly\"\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"nightly\" '.[] | select(.tag_name==\"nightly\") | .assets[].browser_download_url' | grep -i \"${ARCH}\" | tail -n 1)\r\nelif [ \"${VERSION}\" == \"dated_weekly\" ]; then\r\n echo -e ${MATCH} \r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"${MATCH}\")\r\nelse\r\n echo -e \"something went wrong\"\r\nfi\r\n\r\necho -e \"download url: ${DOWNLOAD_URL}\"\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip -o files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n wget https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/veloren\/settings.ron \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n echo \"config file pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", "container": "debian:bullseye-slim", "entrypoint": "bash" } @@ -30,22 +30,22 @@ "variables": [ { "name": "Version", - "description": "The version you want weekly or nightly", + "description": "weekly = download the latest weekly build,\r\nnightly = download the latestes nightly build,\r\ndated_weekly = download specific weekly build for that set the Weekly specific build date.", "env_variable": "VERSION", "default_value": "weekly", - "user_viewable": false, - "user_editable": false, - "rules": "required|string|in:weekly,nightly", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|in:weekly,nightly,dated_weekly", "field_type": "text" }, { - "name": "Release date", - "description": "The date of the version you want look here:\r\nhttps:\/\/github.com\/veloren\/veloren\/releases\r\n\r\neverything after the x86_64 but not the first -\r\nand not the .zip extention\r\n\r\nexample:\r\n2022-08-31T08_26", + "name": "Weekly specific build date", + "description": "The date of the weekly version you want. \r\nOnly used if Version is set to dated_weekly!\r\nhttps:\/\/github.com\/veloren\/veloren\/releases\r\n\r\nEverything after the x86_64 but not the first -\r\nand not the .zip extention\r\n\r\nexample:\r\n2022-08-31T08_26 or 2022-09-26T13_34", "env_variable": "RELEASE_DATE", "default_value": "2022-09-26T13_34", "user_viewable": true, "user_editable": true, - "rules": "required|string|max:40", + "rules": "nullable|string|max:40", "field_type": "text" }, { diff --git a/game_eggs/veloren/settings.ron b/game_eggs/veloren/settings.ron new file mode 100644 index 00000000..bdff2966 --- /dev/null +++ b/game_eggs/veloren/settings.ron @@ -0,0 +1,36 @@ +( + gameserver_protocols: [ + Tcp( + address: "[::]:14004", + ), + Tcp( + address: "0.0.0.0:14004", + ), + ], + metrics_address: "127.0.0.1:14005", + auth_server_address: Some("https://auth.veloren.net"), + max_players: 100, + world_seed: 230, + server_name: "Veloren Server", + start_time: 32400.0, + map_file: None, + max_view_distance: Some(65), + max_player_group_size: 6, + client_timeout: ( + secs: 40, + nanos: 0, + ), + spawn_town: None, + max_player_for_kill_broadcast: None, + calendar_mode: Auto, + gameplay: ( + battle_mode: Global(PvP), + safe_spawn: false, + explosion_burn_marks: true, + ), + moderation: ( + banned_words_files: [], + automod: false, + admins_exempt: true, + ), +) \ No newline at end of file From 25b50c328bb11fdad7775a00f570585a44431833 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sat, 22 Oct 2022 11:27:06 +0200 Subject: [PATCH 6/9] Changes --- game_eggs/veloren/README.md | 6 ++++++ game_eggs/veloren/egg-veloren.json | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/game_eggs/veloren/README.md b/game_eggs/veloren/README.md index df3bdcd6..668a38c4 100644 --- a/game_eggs/veloren/README.md +++ b/game_eggs/veloren/README.md @@ -8,6 +8,12 @@ Veloren is fully open-source, licensed under GPL 3. It uses original graphics, m ## Server Ports +**Due to there new config file you have to set the game port manual in the config file!!** + +`/home/container/userdata/server/server_config/settings.ron` +- Line 4: `address: "[::]:14004",` -> ` address: "[::]:",` +- Line 7: `address: "0.0.0.0:14004",`-> `address: "0.0.0.0:",` + Ports required to run the server in a table format. | Port | default | diff --git a/game_eggs/veloren/egg-veloren.json b/game_eggs/veloren/egg-veloren.json index 7b90e24c..56940ee9 100644 --- a/game_eggs/veloren/egg-veloren.json +++ b/game_eggs/veloren/egg-veloren.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-09-30T19:32:46+02:00", + "exported_at": "2022-10-22T11:26:09+02:00", "name": "Veloren", "author": "parker@parkervcp.com", "description": "Veloren is a multiplayer voxel RPG written in Rust. It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft.", @@ -15,14 +15,14 @@ "file_denylist": [], "startup": ".\/veloren-server-cli", "config": { - "files": "{\r\n \"userdata\/server\/server_config\/settings.ron\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" address\": \" address: \\\"0.0.0.0:{{server.build.default.port}}\\\",\",\r\n \" metrics_address\": \" metrics_address: \\\"0.0.0.0:{{server.build.env.METRICS_PORT}}\\\",\",\r\n \" server_name\": \" server_name: \\\"{{server.build.env.SERVER_NAME}}\\\",\"\r\n }\r\n }\r\n}", + "files": "{\r\n \"userdata\/server\/server_config\/settings.ron\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" metrics_address\": \" metrics_address: \\\"0.0.0.0:{{server.build.env.METRICS_PORT}}\\\",\",\r\n \" server_name\": \" server_name: \\\"{{server.build.env.SERVER_NAME}}\\\",\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \"Server is ready to accept connections\"\r\n}", "logs": "{}", "stop": "shutdown graceful 10" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux-x86_64\" || echo \"linux-aarch64\")\r\nPART=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMATCH_AND_SPACES=$(echo \"weekly\" && echo ${PART} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MATCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n echo -e \"weekly\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"${ARCH}\" | tail -n 1)\r\nelif [ \"${VERSION}\" == \"nightly\" ]; then\r\n echo -e \"nightly\"\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"nightly\" '.[] | select(.tag_name==\"nightly\") | .assets[].browser_download_url' | grep -i \"${ARCH}\" | tail -n 1)\r\nelif [ \"${VERSION}\" == \"dated_weekly\" ]; then\r\n echo -e ${MATCH} \r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"${MATCH}\")\r\nelse\r\n echo -e \"something went wrong\"\r\nfi\r\n\r\necho -e \"download url: ${DOWNLOAD_URL}\"\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip -o files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n wget https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/veloren\/settings.ron \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n echo \"config file pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", + "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux-x86_64\" || echo \"linux-aarch64\")\r\nPART=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMATCH_AND_SPACES=$(echo \"weekly\" && echo ${PART} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MATCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n echo -e \"weekly\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"${ARCH}\" | tail -n 1)\r\nelif [ \"${VERSION}\" == \"nightly\" ]; then\r\n echo -e \"nightly\"\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"nightly\" '.[] | select(.tag_name==\"nightly\") | .assets[].browser_download_url' | grep -i \"${ARCH}\" | tail -n 1)\r\nelif [ \"${VERSION}\" == \"dated_weekly\" ]; then\r\n echo -e ${MATCH} \r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"${MATCH}\")\r\nelse\r\n echo -e \"something went wrong\"\r\nfi\r\n\r\necho -e \"download url: ${DOWNLOAD_URL}\"\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip -o files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n wget https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/veloren\/settings.ron \/tmp\/settings.ron\r\n sed \"s\/14004\/${SERVER_PORT}\/g\" \/tmp\/settings.ron > \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n rm \/tmp\/settings.ron\r\n echo \"config file pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", "container": "debian:bullseye-slim", "entrypoint": "bash" } @@ -42,7 +42,7 @@ "name": "Weekly specific build date", "description": "The date of the weekly version you want. \r\nOnly used if Version is set to dated_weekly!\r\nhttps:\/\/github.com\/veloren\/veloren\/releases\r\n\r\nEverything after the x86_64 but not the first -\r\nand not the .zip extention\r\n\r\nexample:\r\n2022-08-31T08_26 or 2022-09-26T13_34", "env_variable": "RELEASE_DATE", - "default_value": "2022-09-26T13_34", + "default_value": "2022-10-19T22_03", "user_viewable": true, "user_editable": true, "rules": "nullable|string|max:40", @@ -52,7 +52,7 @@ "name": "Server name", "description": "The name your server will be displaying", "env_variable": "SERVER_NAME", - "default_value": "A ptero hosted server", + "default_value": "A pterodactyl hosted server", "user_viewable": true, "user_editable": true, "rules": "required|string|max:64", From e5b9f524f147da62c52bd346c415fd931a05ba3e Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sat, 22 Oct 2022 11:45:23 +0200 Subject: [PATCH 7/9] fix download as there latest branch in not weekly but nightly --- game_eggs/veloren/egg-veloren.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game_eggs/veloren/egg-veloren.json b/game_eggs/veloren/egg-veloren.json index 56940ee9..f57630a9 100644 --- a/game_eggs/veloren/egg-veloren.json +++ b/game_eggs/veloren/egg-veloren.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-10-22T11:26:09+02:00", + "exported_at": "2022-10-22T11:44:17+02:00", "name": "Veloren", "author": "parker@parkervcp.com", "description": "Veloren is a multiplayer voxel RPG written in Rust. It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft.", @@ -22,7 +22,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux-x86_64\" || echo \"linux-aarch64\")\r\nPART=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMATCH_AND_SPACES=$(echo \"weekly\" && echo ${PART} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MATCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n echo -e \"weekly\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"${ARCH}\" | tail -n 1)\r\nelif [ \"${VERSION}\" == \"nightly\" ]; then\r\n echo -e \"nightly\"\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"nightly\" '.[] | select(.tag_name==\"nightly\") | .assets[].browser_download_url' | grep -i \"${ARCH}\" | tail -n 1)\r\nelif [ \"${VERSION}\" == \"dated_weekly\" ]; then\r\n echo -e ${MATCH} \r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"${MATCH}\")\r\nelse\r\n echo -e \"something went wrong\"\r\nfi\r\n\r\necho -e \"download url: ${DOWNLOAD_URL}\"\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip -o files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n wget https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/veloren\/settings.ron \/tmp\/settings.ron\r\n sed \"s\/14004\/${SERVER_PORT}\/g\" \/tmp\/settings.ron > \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n rm \/tmp\/settings.ron\r\n echo \"config file pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", + "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux-x86_64\" || echo \"linux-aarch64\")\r\nPART=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMATCH_AND_SPACES=$(echo \"weekly\" && echo ${PART} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MATCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n echo -e \"weekly\"\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"weekly\" '.[] | select(.tag_name==\"weekly\") | .assets[].browser_download_url' | grep -i \"${ARCH}\" | tail -n 1)\r\nelif [ \"${VERSION}\" == \"nightly\" ]; then\r\n echo -e \"nightly\"\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"nightly\" '.[] | select(.tag_name==\"nightly\") | .assets[].browser_download_url' | grep -i \"${ARCH}\" | tail -n 1)\r\nelif [ \"${VERSION}\" == \"dated_weekly\" ]; then\r\n echo -e ${MATCH} \r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"weekly\" '.[] | select(.tag_name==\"weekly\") | .assets[].browser_download_url' | grep -i \"${MATCH}\")\r\nelse\r\n echo -e \"something went wrong\"\r\nfi\r\n\r\necho -e \"download url: ${DOWNLOAD_URL}\"\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip -o files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n wget https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/veloren\/settings.ron \/tmp\/settings.ron\r\n sed \"s\/14004\/${SERVER_PORT}\/g\" \/tmp\/settings.ron > \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n rm \/tmp\/settings.ron\r\n echo \"config file pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", "container": "debian:bullseye-slim", "entrypoint": "bash" } From a1a3585ab100e2e4061bf3f55cccb46a16f4e4bf Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Mon, 24 Oct 2022 19:09:39 +0200 Subject: [PATCH 8/9] latest fix --- game_eggs/veloren/egg-veloren.json | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/game_eggs/veloren/egg-veloren.json b/game_eggs/veloren/egg-veloren.json index f57630a9..339034cc 100644 --- a/game_eggs/veloren/egg-veloren.json +++ b/game_eggs/veloren/egg-veloren.json @@ -4,13 +4,13 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-10-22T11:44:17+02:00", + "exported_at": "2022-10-24T19:08:31+02:00", "name": "Veloren", "author": "parker@parkervcp.com", "description": "Veloren is a multiplayer voxel RPG written in Rust. It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft.", "features": null, "docker_images": { - "DEBIAN": "ghcr.io\/parkervcp\/yolks:debian" + "Debian": "ghcr.io\/parkervcp\/yolks:debian" }, "file_denylist": [], "startup": ".\/veloren-server-cli", @@ -22,7 +22,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/veloren\/veloren\/releases\")\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux-x86_64\" || echo \"linux-aarch64\")\r\nPART=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"-linux-x86_64-\" || echo \"-linux-aarch64-\")\r\nMATCH_AND_SPACES=$(echo \"weekly\" && echo ${PART} && echo ${RELEASE_DATE})\r\nMATCH=$(echo ${MATCH_AND_SPACES} | sed 's\/ \/\/g')\r\n\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n echo -e \"weekly\"\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"weekly\" '.[] | select(.tag_name==\"weekly\") | .assets[].browser_download_url' | grep -i \"${ARCH}\" | tail -n 1)\r\nelif [ \"${VERSION}\" == \"nightly\" ]; then\r\n echo -e \"nightly\"\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"nightly\" '.[] | select(.tag_name==\"nightly\") | .assets[].browser_download_url' | grep -i \"${ARCH}\" | tail -n 1)\r\nelif [ \"${VERSION}\" == \"dated_weekly\" ]; then\r\n echo -e ${MATCH} \r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"weekly\" '.[] | select(.tag_name==\"weekly\") | .assets[].browser_download_url' | grep -i \"${MATCH}\")\r\nelse\r\n echo -e \"something went wrong\"\r\nfi\r\n\r\necho -e \"download url: ${DOWNLOAD_URL}\"\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip -o files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n wget https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/veloren\/settings.ron \/tmp\/settings.ron\r\n sed \"s\/14004\/${SERVER_PORT}\/g\" \/tmp\/settings.ron > \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n rm \/tmp\/settings.ron\r\n echo \"config file pulled\"\r\nfi\r\n\r\necho -e \"install complete\"", + "script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y curl wget unzip git jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"x86_64\" || echo \"aarch64\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"weekly\" ]; then\r\n echo -e \"weekly\"\r\n DOWNLOAD_URL=https:\/\/download.veloren.net\/latest\/linux\/${ARCH}\/weekly\r\nelif [ \"${VERSION}\" == \"nightly\" ]; then\r\n echo -e \"nightly\"\r\n DOWNLOAD_URL=https:\/\/download.veloren.net\/latest\/linux\/${ARCH}\/nightly\r\nelse\r\n echo -e \"something went wrong\"\r\nfi\r\n\r\necho -e \"download url: ${DOWNLOAD_URL}\"\r\nwget ${DOWNLOAD_URL} -O files.zip\r\n\r\nunzip -o files.zip\r\nrm files.zip\r\n\r\nchmod +x veloren-server-cli\r\n\r\n## generate config because there is no better way to get it.\r\nmkdir -p \/mnt\/server\/userdata\/server\/server_config\/\r\nif [ ! -f \/mnt\/server\/userdata\/server\/server_config\/settings.ron ]; then\r\n wget https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/veloren\/settings.ron -O \/tmp\/settings.ron\r\n sed \"s\/14004\/${SERVER_PORT}\/g\" \/tmp\/settings.ron > \/mnt\/server\/userdata\/server\/server_config\/settings.ron\r\n rm \/tmp\/settings.ron\r\n echo \"config file pulled\"\r\nfi\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"", "container": "debian:bullseye-slim", "entrypoint": "bash" } @@ -30,22 +30,12 @@ "variables": [ { "name": "Version", - "description": "weekly = download the latest weekly build,\r\nnightly = download the latestes nightly build,\r\ndated_weekly = download specific weekly build for that set the Weekly specific build date.", + "description": "weekly = download the latest weekly build.\r\nnightly = download the latest nightly build.", "env_variable": "VERSION", "default_value": "weekly", "user_viewable": true, "user_editable": true, - "rules": "required|string|in:weekly,nightly,dated_weekly", - "field_type": "text" - }, - { - "name": "Weekly specific build date", - "description": "The date of the weekly version you want. \r\nOnly used if Version is set to dated_weekly!\r\nhttps:\/\/github.com\/veloren\/veloren\/releases\r\n\r\nEverything after the x86_64 but not the first -\r\nand not the .zip extention\r\n\r\nexample:\r\n2022-08-31T08_26 or 2022-09-26T13_34", - "env_variable": "RELEASE_DATE", - "default_value": "2022-10-19T22_03", - "user_viewable": true, - "user_editable": true, - "rules": "nullable|string|max:40", + "rules": "required|string|in:weekly,nightly", "field_type": "text" }, { From cb22823a2fc967b7c7334a850a91d38f53fc3417 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Mon, 24 Oct 2022 19:25:57 +0200 Subject: [PATCH 9/9] fix wget download config file --- game_eggs/veloren/egg-veloren.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game_eggs/veloren/egg-veloren.json b/game_eggs/veloren/egg-veloren.json index 339034cc..ea69264a 100644 --- a/game_eggs/veloren/egg-veloren.json +++ b/game_eggs/veloren/egg-veloren.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-10-24T19:08:31+02:00", + "exported_at": "2022-10-24T19:25:32+02:00", "name": "Veloren", "author": "parker@parkervcp.com", "description": "Veloren is a multiplayer voxel RPG written in Rust. It is inspired by games such as Cube World, Legend of Zelda: Breath of the Wild, Dwarf Fortress and Minecraft.", @@ -59,4 +59,4 @@ "field_type": "text" } ] -} \ No newline at end of file +}