From 245d3326e4b9f36a0b015eb33247aab7d19365af Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Thu, 16 Feb 2023 16:18:02 +0100 Subject: [PATCH 1/5] rewrite minetest --- game_eggs/minetest/egg-minetest.json | 136 ++++++++++++++++++++++++--- 1 file changed, 121 insertions(+), 15 deletions(-) diff --git a/game_eggs/minetest/egg-minetest.json b/game_eggs/minetest/egg-minetest.json index 07a37fdf..d047cbbc 100644 --- a/game_eggs/minetest/egg-minetest.json +++ b/game_eggs/minetest/egg-minetest.json @@ -1,36 +1,142 @@ { "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", "meta": { - "version": "PTDL_v1" + "version": "PTDL_v2", + "update_url": null }, - "exported_at": "2020-11-02T22:59:26-05:00", + "exported_at": "2023-02-16T16:17:26+01:00", "name": "Minetest", "author": "support@pterodactyl.io", "description": "An open source voxel game engine. Play one of our many games, mod a game to your liking, make your own game, or play on a multiplayer server.", - "image": "quay.io\/parkervcp\/pterodactyl-images:base_ubuntu", - "startup": ".\/bin\/minetestserver --port {{SERVER_PORT}} --terminal", + "features": null, + "docker_images": { + "ghcr.io\/parkervcp\/games:minetest": "ghcr.io\/parkervcp\/games:minetest" + }, + "file_denylist": [], + "startup": "minetest --server --port {{SERVER_PORT}} --world \/home\/container\/.minetest\/{{WORLD_NAME}} --terminal --config \/home\/container\/minetest.conf --logfile \/home\/container\/server.log", "config": { - "files": "{}", - "startup": "{\r\n \"done\": \" Server for gameid\",\r\n \"userInteraction\": []\r\n}", - "logs": "{\r\n \"custom\": false,\r\n \"location\": \"debug.txt\"\r\n}", + "files": "{\r\n \"minetest.conf\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" name = \": \" name = {{server.build.env.SERVER_ADMIN_NAME}}\",\r\n \" server_name = \": \" server_name = {{server.build.env.SERVER_NAME}}\",\r\n \" server_description = \": \" server_description = {{server.build.env.SERVER_DESC}}\",\r\n \" server_address = \": \" server_address = {{server.build.env.SERVER_DOMAIN}}\",\r\n \" server_url = \": \" server_url = {{server.build.env.SERVER_URL}}\",\r\n \" server_announce = \": \" server_announce = {{server.build.env.SERVER_ANNOUNCE}}\",\r\n \" serverlist_url = \": \" serverlist_url = {{server.build.env.SERVER_LIST_URL}}\",\r\n \" motd = \": \" motd = {{server.build.env.SERVER_MOTD}}\",\r\n \" max_users = \": \" max_users = {{server.build.env.SERVER_MAX_USERS}}\",\r\n \" bind_address = \": \" bind_address = 0.0.0.0\",\r\n \" default_password = \": \" default_password = {{server.build.env.SERVER_PASSWORD}}\"\r\n }\r\n }\r\n}", + "startup": "{\r\n \"done\": \" Server for gameid\"\r\n}", + "logs": "{}", "stop": "\/shutdown" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Minetest Installation Script\r\ncd \/mnt\/server &&\r\n\r\n# Install installation dependencies\r\napt update &&\r\napt -y install unzip wget build-essential libirrlicht-dev cmake libbz2-dev libjpeg-dev libxxf86vm-dev libsqlite3-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev luajit libncurses5-dev &&\r\n#touch test &&\r\n\r\n# Download, compile and prepare the engine\r\nwget -Osrc.zip https:\/\/github.com\/minetest\/minetest\/archive\/\"${MTVERSION}\".zip &&\r\nunzip .\/src.zip &&\r\nrm .\/src.zip &&\r\ncd .\/minetest-\"${MTVERSION}\" &&\r\ncmake . -DRUN_IN_PLACE=TRUE -DBUILD_CLIENT=FALSE -DBUILD_SERVER=TRUE -DENABLE_GLES=OFF -DENABLE_POSTGRESQL=OFF -DENABLE_REDIS=OFF -DENABLE_SOUND=OFF -DENABLE_LEVELDB=OFF -DENABLE_SPATIAL=OFF &&\r\nmake -j$(nproc) &&\r\nmake package &&\r\nmv .\/minetest-\"${MTVERSION}\"-linux.tar.gz ..\/ &&\r\ncd .. &&\r\nrm -rf .\/minetest-\"${MTVERSION}\" &&\r\ntar xfz .\/minetest-\"${MTVERSION}\"-linux.tar.gz &&\r\nrm minetest-\"${MTVERSION}\"-linux.tar.gz &&\r\nmv .\/minetest-\"${MTVERSION}\"-linux\/* .\/ &&\r\nrm -rf minetest-\"${MTVERSION}\"-linux &&\r\ntouch .\/minetest.conf &&\r\n\r\n# Download and prepare the game\r\ncd .\/games &&\r\nwget -Ominetest_game.zip https:\/\/github.com\/minetest\/minetest_game\/archive\/\"${MTVERSION}\".zip &&\r\nunzip minetest_game.zip &&\r\n#rm minetest_game.zip &&\r\nmv minetest_game-\"${MTVERSION}\" minetest_game &&\r\ncd .. &&\r\n\r\n# Clean up a bit\r\nrm -rf clientmods unix doc client fonts textures &&\r\n\r\n# Done!\r\necho \"Installation was successfully completed!\"", - "container": "ubuntu:18.04", + "script": "#!\/bin\/bash\r\n# Minetest Installation Script\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n\r\nLOG_FILE=\/mnt\/server\/server.log\r\nif [ -f \"$LOG_FILE\" ]; then\r\n echo \"Log file already exists.\"\r\nelse \r\n echo \"Log file does not exist. Making one...\"\r\n touch \/mnt\/server\/server.log\r\nfi\r\n\r\nCONFIG_FILE=\/mnt\/server\/minetest.conf\r\nif [ -f \"$FILE\" ]; then\r\n echo \"Config file already exists.\"\r\nelse \r\n echo \"Config file does not exist. Making one...\"\r\n curl -sSL -o \/mnt\/server\/minetest.conf https:\/\/pteropaste.com\/mwxco1\r\nfi\r\n\r\n\r\n# Done!\r\necho \"Installation was successfully completed!\"", + "container": "ghcr.io\/parkervcp\/installers:debian", "entrypoint": "bash" } }, "variables": [ { - "name": "Version", - "description": "The version of MT to install. Releases only", - "env_variable": "MTVERSION", - "default_value": "5.4.1", - "user_viewable": false, + "name": "Name of the admin player.", + "description": "When running a server, clients connecting with this name are admins.", + "env_variable": "SERVER_ADMIN_NAME", + "default_value": "", + "user_viewable": true, "user_editable": true, - "rules": "required|string|max:10" + "rules": "required|string|max:32", + "field_type": "text" + }, + { + "name": "Server name", + "description": "Name of the server, to be displayed when players join and in the serverlist.", + "env_variable": "SERVER_NAME", + "default_value": "Minetest server", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:64", + "field_type": "text" + }, + { + "name": "Description of the server", + "description": "Description of server, to be displayed when players join and in the serverlist.", + "env_variable": "SERVER_DESC", + "default_value": "mine here", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:64", + "field_type": "text" + }, + { + "name": "Domain name of the server", + "description": "Domain name of server, to be displayed in the serverlist.", + "env_variable": "SERVER_DOMAIN", + "default_value": "game.minetest.net", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|", + "field_type": "text" + }, + { + "name": "Server url", + "description": "Homepage of server, to be displayed in the serverlist.", + "env_variable": "SERVER_URL", + "default_value": "https:\/\/minetest.net", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|", + "field_type": "text" + }, + { + "name": "Show in server list", + "description": "Automatically report to the serverlist.", + "env_variable": "SERVER_ANNOUNCE", + "default_value": "true", + "user_viewable": true, + "user_editable": true, + "rules": "string|in:true,false", + "field_type": "text" + }, + { + "name": "Announce serverlist", + "description": "Announce to this serverlist.", + "env_variable": "SERVER_LIST_URL", + "default_value": "servers.minetest.net", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|", + "field_type": "text" + }, + { + "name": "message of the day", + "description": "Message of the day displayed to players connecting.", + "env_variable": "SERVER_MOTD", + "default_value": "", + "user_viewable": true, + "user_editable": true, + "rules": "nullable|string|max:128", + "field_type": "text" + }, + { + "name": "Max Players", + "description": "Maximum number of players that can be connected simultaneously.", + "env_variable": "SERVER_MAX_USERS", + "default_value": "15", + "user_viewable": true, + "user_editable": false, + "rules": "required|string|min:0|max:65535", + "field_type": "text" + }, + { + "name": "Server password", + "description": "New users need to input this password.", + "env_variable": "SERVER_PASSWORD", + "default_value": "", + "user_viewable": true, + "user_editable": true, + "rules": "nullable|string|max:64", + "field_type": "text" + }, + { + "name": "World name", + "description": "The name of the world", + "env_variable": "WORLD_NAME", + "default_value": "world", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:32", + "field_type": "text" } ] } From 1dfa34683983800e28b865f96efc28d4d5cab41a Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Thu, 16 Feb 2023 16:26:42 +0100 Subject: [PATCH 2/5] Update README.md --- game_eggs/minetest/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/game_eggs/minetest/README.md b/game_eggs/minetest/README.md index 591733ca..28e59989 100644 --- a/game_eggs/minetest/README.md +++ b/game_eggs/minetest/README.md @@ -1,3 +1,7 @@ # Minetest An open source voxel game engine. Play one of our many games, mod a game to your liking, make your own game, or play on a multiplayer server. + +## Console + +The console is currently bugged. It does work but the startup message is messed up From 91e5a36ca6a5a7202332d5224a2ed1407d841f70 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Thu, 23 Feb 2023 19:26:34 +0100 Subject: [PATCH 3/5] minetest: update 2 --- game_eggs/minetest/egg-minetest.json | 60 +++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/game_eggs/minetest/egg-minetest.json b/game_eggs/minetest/egg-minetest.json index d047cbbc..9e2a1eb8 100644 --- a/game_eggs/minetest/egg-minetest.json +++ b/game_eggs/minetest/egg-minetest.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2023-02-16T16:17:26+01:00", + "exported_at": "2023-02-23T19:25:23+01:00", "name": "Minetest", "author": "support@pterodactyl.io", "description": "An open source voxel game engine. Play one of our many games, mod a game to your liking, make your own game, or play on a multiplayer server.", @@ -13,16 +13,16 @@ "ghcr.io\/parkervcp\/games:minetest": "ghcr.io\/parkervcp\/games:minetest" }, "file_denylist": [], - "startup": "minetest --server --port {{SERVER_PORT}} --world \/home\/container\/.minetest\/{{WORLD_NAME}} --terminal --config \/home\/container\/minetest.conf --logfile \/home\/container\/server.log", + "startup": "minetest --server --port {{SERVER_PORT}} --world \/home\/container\/worlds\/{{WORLD_NAME}} --terminal --config \/home\/container\/minetest.conf --logfile \/home\/container\/server.log", "config": { - "files": "{\r\n \"minetest.conf\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" name = \": \" name = {{server.build.env.SERVER_ADMIN_NAME}}\",\r\n \" server_name = \": \" server_name = {{server.build.env.SERVER_NAME}}\",\r\n \" server_description = \": \" server_description = {{server.build.env.SERVER_DESC}}\",\r\n \" server_address = \": \" server_address = {{server.build.env.SERVER_DOMAIN}}\",\r\n \" server_url = \": \" server_url = {{server.build.env.SERVER_URL}}\",\r\n \" server_announce = \": \" server_announce = {{server.build.env.SERVER_ANNOUNCE}}\",\r\n \" serverlist_url = \": \" serverlist_url = {{server.build.env.SERVER_LIST_URL}}\",\r\n \" motd = \": \" motd = {{server.build.env.SERVER_MOTD}}\",\r\n \" max_users = \": \" max_users = {{server.build.env.SERVER_MAX_USERS}}\",\r\n \" bind_address = \": \" bind_address = 0.0.0.0\",\r\n \" default_password = \": \" default_password = {{server.build.env.SERVER_PASSWORD}}\"\r\n }\r\n }\r\n}", + "files": "{\r\n \"minetest.conf\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"name\": \"name = {{server.build.env.SERVER_ADMIN_NAME}}\",\r\n \"server_name\": \"server_name = {{server.build.env.SERVER_NAME}}\",\r\n \"server_description\": \"server_description = {{server.build.env.SERVER_DESC}}\",\r\n \"server_address\": \"server_address = {{server.build.env.SERVER_DOMAIN}}\",\r\n \"server_url\": \"server_url = {{server.build.env.SERVER_URL}}\",\r\n \"server_announce\": \"server_announce = {{server.build.env.SERVER_ANNOUNCE}}\",\r\n \"serverlist_url\": \"serverlist_url = {{server.build.env.SERVER_LIST_URL}}\",\r\n \"motd\": \"motd = {{server.build.env.SERVER_MOTD}}\",\r\n \"max_users\": \"max_users = {{server.build.env.SERVER_MAX_USERS}}\",\r\n \"bind_address\": \"bind_address = 0.0.0.0\",\r\n \"default_password\": \"default_password = {{server.build.env.SERVER_PASSWORD}}\",\r\n \"default_game\": \"default_game = {{server.build.env.DEFAULT_GAME}}\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \" Server for gameid\"\r\n}", "logs": "{}", - "stop": "\/shutdown" + "stop": "^^C" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Minetest Installation Script\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n\r\nLOG_FILE=\/mnt\/server\/server.log\r\nif [ -f \"$LOG_FILE\" ]; then\r\n echo \"Log file already exists.\"\r\nelse \r\n echo \"Log file does not exist. Making one...\"\r\n touch \/mnt\/server\/server.log\r\nfi\r\n\r\nCONFIG_FILE=\/mnt\/server\/minetest.conf\r\nif [ -f \"$FILE\" ]; then\r\n echo \"Config file already exists.\"\r\nelse \r\n echo \"Config file does not exist. Making one...\"\r\n curl -sSL -o \/mnt\/server\/minetest.conf https:\/\/pteropaste.com\/mwxco1\r\nfi\r\n\r\n\r\n# Done!\r\necho \"Installation was successfully completed!\"", + "script": "#!\/bin\/bash\r\n# Minetest Installation Script\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit\r\n\r\nLOG_FILE=\/mnt\/server\/server.log\r\nif [ -f \"$LOG_FILE\" ]; then\r\n echo \"Log file already exists.\"\r\nelse \r\n echo \"Log file does not exist. Making one...\"\r\n touch \"$LOG_FILE\"\r\nfi\r\n\r\nCONFIG_FILE=\/mnt\/server\/minetest.conf\r\nif [ -f \"$CONFIG_FILE\" ]; then\r\n echo \"Config file already exists.\"\r\nelse \r\n echo \"Config file does not exist. Making one...\"\r\n curl -sSL -o \/mnt\/server\/minetest.conf.example https:\/\/raw.githubusercontent.com\/minetest\/minetest\/master\/minetest.conf.example\r\n echo -e \"## Server settings generated by pterodactyl\\nname\\nserver_name\\nserver_description\\nserver_address\\nserver_url\\nserver_announce\\nserverlist_url\\nmotd\\nmax_users\\nbind_address\\ndefault_password\\ndefault_game\\n\\n## Custom server settings\\n\" >> \"$CONFIG_FILE\"\r\nfi\r\n\r\nGAMES_FOLDER=\/mnt\/server\/games\r\nif [ -d \"$GAMES_FOLDER\" ]; then\r\n echo \"GAMES folder already exists.\"\r\nelse \r\n echo \"GAMES folder does not exist. Making one...\"\r\n mkdir -p $GAMES_FOLDER\r\nfi\r\n\r\nMOD_FOLDER=\/mnt\/server\/mods\r\nif [ -d \"$MOD_FOLDER\" ]; then\r\n echo \"Mods folder already exists.\"\r\nelse \r\n echo \"Mods folder does not exist. Making one...\"\r\n mkdir -p $MOD_FOLDER\r\n curl -sSL -o \"$MOD_FOLDER\"\/mods_here.txt https:\/\/raw.githubusercontent.com\/minetest\/minetest\/master\/mods\/mods_here.txt\r\nfi\r\n\r\nif [ \"$COMMUNITY_DOWNLOAD\" == \"1\" ]; then\r\n if [ -z \"$COMMUNITY_GAME_NAME\" ]\r\n then\r\n echo \"The COMMUNITY_GAME_NAME variable is required to download a community game\"\r\n exit\r\n fi\r\n if [ -z \"$COMMUNITY_GAME_AUTOR\" ]\r\n then\r\n echo \"The COMMUNITY_GAME_AUTOR variable is required to download a community game\"\r\n exit\r\n fi\r\n cd \/mnt\/server\/games\r\n D_URL=$(curl -s https:\/\/content.minetest.net\/packages\/$COMMUNITY_GAME_AUTOR\/$COMMUNITY_GAME_NAME\/ | grep -i download | grep packages | grep download | grep -o 'href=\".*\"' | cut -d \"=\" -f2- | egrep title= | awk -F' ' '{print $1}' | tr -d '\"')\r\n curl --progress-bar --verbose -sSL -o game.zip https:\/\/content.minetest.net\/$D_URL\r\n cd \/mnt\/server\/games\r\n unzip -o game.zip\r\n rm game.zip\r\nfi\r\n\r\n# Done!\r\necho \"Installation was successfully completed!\"", "container": "ghcr.io\/parkervcp\/installers:debian", "entrypoint": "bash" } @@ -137,6 +137,56 @@ "user_editable": true, "rules": "required|string|max:32", "field_type": "text" + }, + { + "name": "Game name", + "description": "Default game when creating a new world. Only change if you have already uploaded the game!", + "env_variable": "DEFAULT_GAME", + "default_value": "minetest", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:32", + "field_type": "text" + }, + { + "name": "Community download", + "description": "Download a community game.\r\nNeeds COMMUNITY_GAME_NAME and COMMUNITY_GAME_AUTOR", + "env_variable": "COMMUNITY_DOWNLOAD", + "default_value": "0", + "user_viewable": true, + "user_editable": true, + "rules": "required|boolean", + "field_type": "text" + }, + { + "name": "Community game name", + "description": "Case sensitive!\r\nExample: https:\/\/content.minetest.net\/packages\/Wuzzy\/mineclone2\/\r\nthen this should be mineclone2", + "env_variable": "COMMUNITY_GAME_NAME", + "default_value": "", + "user_viewable": true, + "user_editable": true, + "rules": "nullable|string|max:64", + "field_type": "text" + }, + { + "name": "Community game author", + "description": "Case-sensitive!\r\nExample: https:\/\/content.minetest.net\/packages\/Wuzzy\/mineclone2\/\r\nthen this should be Wuzzy", + "env_variable": "COMMUNITY_GAME_AUTOR", + "default_value": "", + "user_viewable": true, + "user_editable": true, + "rules": "nullable|string|max:64", + "field_type": "text" + }, + { + "name": "Game PATH", + "description": "", + "env_variable": "MINETEST_SUBGAME_PATH", + "default_value": "\/home\/container\/games", + "user_viewable": true, + "user_editable": false, + "rules": "required|string|max:64", + "field_type": "text" } ] } From 35376d4a8666d41845783e0a913234afa36a57d6 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sat, 25 Feb 2023 18:37:47 +0100 Subject: [PATCH 4/5] minetest: update 2 --- game_eggs/minetest/README.md | 9 ++++++++- game_eggs/minetest/egg-minetest.json | 14 +++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/game_eggs/minetest/README.md b/game_eggs/minetest/README.md index 28e59989..7a93329c 100644 --- a/game_eggs/minetest/README.md +++ b/game_eggs/minetest/README.md @@ -2,6 +2,13 @@ An open source voxel game engine. Play one of our many games, mod a game to your liking, make your own game, or play on a multiplayer server. +## Stopping the server + +For the server to be able to stop properly you have to give the admin/console user the permission `server` else you will have to kill the server and no date will be saved! + ## Console -The console is currently bugged. It does work but the startup message is messed up +The console is currently bugged. It does work but the startup message is messed up. + +## Rewrite +A special thank you to [Tealk](https://github.com/Tealk) for helping me rewrite this egg. \ No newline at end of file diff --git a/game_eggs/minetest/egg-minetest.json b/game_eggs/minetest/egg-minetest.json index 9e2a1eb8..3fe9faf4 100644 --- a/game_eggs/minetest/egg-minetest.json +++ b/game_eggs/minetest/egg-minetest.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2023-02-23T19:25:23+01:00", + "exported_at": "2023-02-25T18:33:22+01:00", "name": "Minetest", "author": "support@pterodactyl.io", "description": "An open source voxel game engine. Play one of our many games, mod a game to your liking, make your own game, or play on a multiplayer server.", @@ -13,16 +13,16 @@ "ghcr.io\/parkervcp\/games:minetest": "ghcr.io\/parkervcp\/games:minetest" }, "file_denylist": [], - "startup": "minetest --server --port {{SERVER_PORT}} --world \/home\/container\/worlds\/{{WORLD_NAME}} --terminal --config \/home\/container\/minetest.conf --logfile \/home\/container\/server.log", + "startup": "minetest --server --port {{SERVER_PORT}} --world \/home\/container\/.minetest\/worlds\/{{WORLD_NAME}} --terminal --config \/home\/container\/minetest.conf --logfile \/home\/container\/server.log", "config": { "files": "{\r\n \"minetest.conf\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"name\": \"name = {{server.build.env.SERVER_ADMIN_NAME}}\",\r\n \"server_name\": \"server_name = {{server.build.env.SERVER_NAME}}\",\r\n \"server_description\": \"server_description = {{server.build.env.SERVER_DESC}}\",\r\n \"server_address\": \"server_address = {{server.build.env.SERVER_DOMAIN}}\",\r\n \"server_url\": \"server_url = {{server.build.env.SERVER_URL}}\",\r\n \"server_announce\": \"server_announce = {{server.build.env.SERVER_ANNOUNCE}}\",\r\n \"serverlist_url\": \"serverlist_url = {{server.build.env.SERVER_LIST_URL}}\",\r\n \"motd\": \"motd = {{server.build.env.SERVER_MOTD}}\",\r\n \"max_users\": \"max_users = {{server.build.env.SERVER_MAX_USERS}}\",\r\n \"bind_address\": \"bind_address = 0.0.0.0\",\r\n \"default_password\": \"default_password = {{server.build.env.SERVER_PASSWORD}}\",\r\n \"default_game\": \"default_game = {{server.build.env.DEFAULT_GAME}}\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \" Server for gameid\"\r\n}", "logs": "{}", - "stop": "^^C" + "stop": "\/shutdown" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Minetest Installation Script\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit\r\n\r\nLOG_FILE=\/mnt\/server\/server.log\r\nif [ -f \"$LOG_FILE\" ]; then\r\n echo \"Log file already exists.\"\r\nelse \r\n echo \"Log file does not exist. Making one...\"\r\n touch \"$LOG_FILE\"\r\nfi\r\n\r\nCONFIG_FILE=\/mnt\/server\/minetest.conf\r\nif [ -f \"$CONFIG_FILE\" ]; then\r\n echo \"Config file already exists.\"\r\nelse \r\n echo \"Config file does not exist. Making one...\"\r\n curl -sSL -o \/mnt\/server\/minetest.conf.example https:\/\/raw.githubusercontent.com\/minetest\/minetest\/master\/minetest.conf.example\r\n echo -e \"## Server settings generated by pterodactyl\\nname\\nserver_name\\nserver_description\\nserver_address\\nserver_url\\nserver_announce\\nserverlist_url\\nmotd\\nmax_users\\nbind_address\\ndefault_password\\ndefault_game\\n\\n## Custom server settings\\n\" >> \"$CONFIG_FILE\"\r\nfi\r\n\r\nGAMES_FOLDER=\/mnt\/server\/games\r\nif [ -d \"$GAMES_FOLDER\" ]; then\r\n echo \"GAMES folder already exists.\"\r\nelse \r\n echo \"GAMES folder does not exist. Making one...\"\r\n mkdir -p $GAMES_FOLDER\r\nfi\r\n\r\nMOD_FOLDER=\/mnt\/server\/mods\r\nif [ -d \"$MOD_FOLDER\" ]; then\r\n echo \"Mods folder already exists.\"\r\nelse \r\n echo \"Mods folder does not exist. Making one...\"\r\n mkdir -p $MOD_FOLDER\r\n curl -sSL -o \"$MOD_FOLDER\"\/mods_here.txt https:\/\/raw.githubusercontent.com\/minetest\/minetest\/master\/mods\/mods_here.txt\r\nfi\r\n\r\nif [ \"$COMMUNITY_DOWNLOAD\" == \"1\" ]; then\r\n if [ -z \"$COMMUNITY_GAME_NAME\" ]\r\n then\r\n echo \"The COMMUNITY_GAME_NAME variable is required to download a community game\"\r\n exit\r\n fi\r\n if [ -z \"$COMMUNITY_GAME_AUTOR\" ]\r\n then\r\n echo \"The COMMUNITY_GAME_AUTOR variable is required to download a community game\"\r\n exit\r\n fi\r\n cd \/mnt\/server\/games\r\n D_URL=$(curl -s https:\/\/content.minetest.net\/packages\/$COMMUNITY_GAME_AUTOR\/$COMMUNITY_GAME_NAME\/ | grep -i download | grep packages | grep download | grep -o 'href=\".*\"' | cut -d \"=\" -f2- | egrep title= | awk -F' ' '{print $1}' | tr -d '\"')\r\n curl --progress-bar --verbose -sSL -o game.zip https:\/\/content.minetest.net\/$D_URL\r\n cd \/mnt\/server\/games\r\n unzip -o game.zip\r\n rm game.zip\r\nfi\r\n\r\n# Done!\r\necho \"Installation was successfully completed!\"", + "script": "#!\/bin\/bash\r\n# Minetest Installation Script\r\nmkdir -p \/mnt\/server\/.minetest\r\n\r\n# Create server.log\r\nLOG_FILE=\/mnt\/server\/server.log\r\nif [ -f \"$LOG_FILE\" ]; then\r\n echo \"Log file already exists.\"\r\nelse \r\n echo \"Log file does not exist. Making one...\"\r\n touch \"$LOG_FILE\"\r\nfi\r\n\r\n# Create minetest.conf\r\nCONFIG_FILE=\/mnt\/server\/minetest.conf\r\nif [ -f \"$CONFIG_FILE\" ]; then\r\n echo \"Config file already exists.\"\r\nelse \r\n echo \"Config file does not exist. Making one...\"\r\n curl -sSL -o \/mnt\/server\/minetest.conf.example https:\/\/raw.githubusercontent.com\/minetest\/minetest\/master\/minetest.conf.example\r\n echo -e \"## Server settings generated by pterodactyl\\nname\\nserver_name\\nserver_description\\nserver_address\\nserver_url\\nserver_announce\\nserverlist_url\\nmotd\\nmax_users\\nbind_address\\ndefault_password\\ndefault_game\\n\\n## Custom server settings\\n\" >> \"$CONFIG_FILE\"\r\nfi\r\n\r\n# Create games folder\r\nGAMES_FOLDER=\/mnt\/server\/.minetest\/games\r\nif [ -d \"$GAMES_FOLDER\" ]; then\r\n echo \"GAMES folder already exists.\"\r\nelse \r\n echo \"GAMES folder does not exist. Making one...\"\r\n mkdir -p $GAMES_FOLDER\r\nfi\r\n\r\n# Create mods folder\r\nMOD_FOLDER=\/mnt\/server\/.minetest\/mods\r\nif [ -d \"$MOD_FOLDER\" ]; then\r\n echo \"Mods folder already exists.\"\r\nelse \r\n echo \"Mods folder does not exist. Making one...\"\r\n mkdir -p $MOD_FOLDER\r\n curl -sSL -o \"$MOD_FOLDER\"\/mods_here.txt https:\/\/raw.githubusercontent.com\/minetest\/minetest\/master\/mods\/mods_here.txt\r\nfi\r\n\r\n# Install Gamemode\r\nif [ \"$COMMUNITY_DOWNLOAD\" == \"1\" ]; then\r\n if ! [ -z \"$COMMUNITY_GAME_NAME\" ]; then\r\n\t\t if ! [ -z \"$COMMUNITY_GAME_AUTOR\" ]; then\r\n\t\t \techo \"Download $COMMUNITY_GAME_NAME\"\r\n\t\t\t\tD_URL=$(curl -s https:\/\/content.minetest.net\/packages\/$COMMUNITY_GAME_AUTOR\/$COMMUNITY_GAME_NAME\/ | grep -i download | grep packages | grep download | grep -o 'href=\".*\"' | cut -d \"=\" -f2- | egrep title= | awk -F' ' '{print $1}' | tr -d '\"')\r\n\t\t\t\tcurl -sSL -o \/mnt\/server\/.minetest\/games.zip https:\/\/content.minetest.net\/$D_URL >\/dev\/null 2>&1\r\n\t\t\t\tunzip -o \/mnt\/server\/.minetest\/games.zip -d \/mnt\/server\/.minetest\/games >\/dev\/null 2>&1\r\n\t\t\t\trm \/mnt\/server\/.minetest\/games.zip\r\n\t\t else\r\n\t\t echo \"The COMMUNITY_GAME_AUTOR variable is required to download a community game\"\r\n\t\t fi\r\n else\r\n echo \"The COMMUNITY_GAME_NAME variable is required to download a community game\"\r\n fi\r\nfi\r\n\r\n# Done!\r\necho \"Installation was successfully completed!\"", "container": "ghcr.io\/parkervcp\/installers:debian", "entrypoint": "bash" } @@ -182,11 +182,11 @@ "name": "Game PATH", "description": "", "env_variable": "MINETEST_SUBGAME_PATH", - "default_value": "\/home\/container\/games", - "user_viewable": true, + "default_value": "\/home\/container\/.minetest\/games", + "user_viewable": false, "user_editable": false, "rules": "required|string|max:64", "field_type": "text" } ] -} +} \ No newline at end of file From 9188434fd0dfaa249f1d5770f595164ee27832d0 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sun, 26 Feb 2023 12:01:19 +0100 Subject: [PATCH 5/5] minetest: update 3 Move everything exept the log file in to the .minetest folder + move to other installation image as this works on arm64 --- game_eggs/minetest/egg-minetest.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/game_eggs/minetest/egg-minetest.json b/game_eggs/minetest/egg-minetest.json index 3fe9faf4..6b47e682 100644 --- a/game_eggs/minetest/egg-minetest.json +++ b/game_eggs/minetest/egg-minetest.json @@ -4,26 +4,26 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2023-02-25T18:33:22+01:00", + "exported_at": "2023-02-26T11:59:47+01:00", "name": "Minetest", "author": "support@pterodactyl.io", "description": "An open source voxel game engine. Play one of our many games, mod a game to your liking, make your own game, or play on a multiplayer server.", "features": null, "docker_images": { - "ghcr.io\/parkervcp\/games:minetest": "ghcr.io\/parkervcp\/games:minetest" + "Minetest": "ghcr.io\/parkervcp\/games:minetest" }, "file_denylist": [], - "startup": "minetest --server --port {{SERVER_PORT}} --world \/home\/container\/.minetest\/worlds\/{{WORLD_NAME}} --terminal --config \/home\/container\/minetest.conf --logfile \/home\/container\/server.log", + "startup": "minetest --server --port {{SERVER_PORT}} --world \/home\/container\/.minetest\/worlds\/{{WORLD_NAME}} --terminal --config \/home\/container\/.minetest\/minetest.conf --logfile \/home\/container\/server.log", "config": { - "files": "{\r\n \"minetest.conf\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"name\": \"name = {{server.build.env.SERVER_ADMIN_NAME}}\",\r\n \"server_name\": \"server_name = {{server.build.env.SERVER_NAME}}\",\r\n \"server_description\": \"server_description = {{server.build.env.SERVER_DESC}}\",\r\n \"server_address\": \"server_address = {{server.build.env.SERVER_DOMAIN}}\",\r\n \"server_url\": \"server_url = {{server.build.env.SERVER_URL}}\",\r\n \"server_announce\": \"server_announce = {{server.build.env.SERVER_ANNOUNCE}}\",\r\n \"serverlist_url\": \"serverlist_url = {{server.build.env.SERVER_LIST_URL}}\",\r\n \"motd\": \"motd = {{server.build.env.SERVER_MOTD}}\",\r\n \"max_users\": \"max_users = {{server.build.env.SERVER_MAX_USERS}}\",\r\n \"bind_address\": \"bind_address = 0.0.0.0\",\r\n \"default_password\": \"default_password = {{server.build.env.SERVER_PASSWORD}}\",\r\n \"default_game\": \"default_game = {{server.build.env.DEFAULT_GAME}}\"\r\n }\r\n }\r\n}", + "files": "{\r\n \".minetest\/minetest.conf\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"name\": \"name = {{server.build.env.SERVER_ADMIN_NAME}}\",\r\n \"server_name\": \"server_name = {{server.build.env.SERVER_NAME}}\",\r\n \"server_description\": \"server_description = {{server.build.env.SERVER_DESC}}\",\r\n \"server_address\": \"server_address = {{server.build.env.SERVER_DOMAIN}}\",\r\n \"server_url\": \"server_url = {{server.build.env.SERVER_URL}}\",\r\n \"server_announce\": \"server_announce = {{server.build.env.SERVER_ANNOUNCE}}\",\r\n \"serverlist_url\": \"serverlist_url = {{server.build.env.SERVER_LIST_URL}}\",\r\n \"motd\": \"motd = {{server.build.env.SERVER_MOTD}}\",\r\n \"max_users\": \"max_users = {{server.build.env.SERVER_MAX_USERS}}\",\r\n \"bind_address\": \"bind_address = 0.0.0.0\",\r\n \"default_password\": \"default_password = {{server.build.env.SERVER_PASSWORD}}\",\r\n \"default_game\": \"default_game = {{server.build.env.DEFAULT_GAME}}\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \" Server for gameid\"\r\n}", "logs": "{}", "stop": "\/shutdown" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Minetest Installation Script\r\nmkdir -p \/mnt\/server\/.minetest\r\n\r\n# Create server.log\r\nLOG_FILE=\/mnt\/server\/server.log\r\nif [ -f \"$LOG_FILE\" ]; then\r\n echo \"Log file already exists.\"\r\nelse \r\n echo \"Log file does not exist. Making one...\"\r\n touch \"$LOG_FILE\"\r\nfi\r\n\r\n# Create minetest.conf\r\nCONFIG_FILE=\/mnt\/server\/minetest.conf\r\nif [ -f \"$CONFIG_FILE\" ]; then\r\n echo \"Config file already exists.\"\r\nelse \r\n echo \"Config file does not exist. Making one...\"\r\n curl -sSL -o \/mnt\/server\/minetest.conf.example https:\/\/raw.githubusercontent.com\/minetest\/minetest\/master\/minetest.conf.example\r\n echo -e \"## Server settings generated by pterodactyl\\nname\\nserver_name\\nserver_description\\nserver_address\\nserver_url\\nserver_announce\\nserverlist_url\\nmotd\\nmax_users\\nbind_address\\ndefault_password\\ndefault_game\\n\\n## Custom server settings\\n\" >> \"$CONFIG_FILE\"\r\nfi\r\n\r\n# Create games folder\r\nGAMES_FOLDER=\/mnt\/server\/.minetest\/games\r\nif [ -d \"$GAMES_FOLDER\" ]; then\r\n echo \"GAMES folder already exists.\"\r\nelse \r\n echo \"GAMES folder does not exist. Making one...\"\r\n mkdir -p $GAMES_FOLDER\r\nfi\r\n\r\n# Create mods folder\r\nMOD_FOLDER=\/mnt\/server\/.minetest\/mods\r\nif [ -d \"$MOD_FOLDER\" ]; then\r\n echo \"Mods folder already exists.\"\r\nelse \r\n echo \"Mods folder does not exist. Making one...\"\r\n mkdir -p $MOD_FOLDER\r\n curl -sSL -o \"$MOD_FOLDER\"\/mods_here.txt https:\/\/raw.githubusercontent.com\/minetest\/minetest\/master\/mods\/mods_here.txt\r\nfi\r\n\r\n# Install Gamemode\r\nif [ \"$COMMUNITY_DOWNLOAD\" == \"1\" ]; then\r\n if ! [ -z \"$COMMUNITY_GAME_NAME\" ]; then\r\n\t\t if ! [ -z \"$COMMUNITY_GAME_AUTOR\" ]; then\r\n\t\t \techo \"Download $COMMUNITY_GAME_NAME\"\r\n\t\t\t\tD_URL=$(curl -s https:\/\/content.minetest.net\/packages\/$COMMUNITY_GAME_AUTOR\/$COMMUNITY_GAME_NAME\/ | grep -i download | grep packages | grep download | grep -o 'href=\".*\"' | cut -d \"=\" -f2- | egrep title= | awk -F' ' '{print $1}' | tr -d '\"')\r\n\t\t\t\tcurl -sSL -o \/mnt\/server\/.minetest\/games.zip https:\/\/content.minetest.net\/$D_URL >\/dev\/null 2>&1\r\n\t\t\t\tunzip -o \/mnt\/server\/.minetest\/games.zip -d \/mnt\/server\/.minetest\/games >\/dev\/null 2>&1\r\n\t\t\t\trm \/mnt\/server\/.minetest\/games.zip\r\n\t\t else\r\n\t\t echo \"The COMMUNITY_GAME_AUTOR variable is required to download a community game\"\r\n\t\t fi\r\n else\r\n echo \"The COMMUNITY_GAME_NAME variable is required to download a community game\"\r\n fi\r\nfi\r\n\r\n# Done!\r\necho \"Installation was successfully completed!\"", - "container": "ghcr.io\/parkervcp\/installers:debian", + "script": "#!\/bin\/bash\r\n# Minetest Installation Script\r\nmkdir -p \/mnt\/server\/.minetest\r\n\r\napt update\r\napt -y install curl unzip\r\n\r\n# Create server.log\r\nLOG_FILE=\/mnt\/server\/server.log\r\nif [ -f \"$LOG_FILE\" ]; then\r\n echo \"Log file already exists.\"\r\nelse \r\n echo \"Log file does not exist. Making one...\"\r\n touch \"$LOG_FILE\"\r\nfi\r\n\r\n# Create minetest.conf\r\nCONFIG_FILE=\/mnt\/server\/.minetest\/minetest.conf\r\nif [ -f \"$CONFIG_FILE\" ]; then\r\n echo \"Config file already exists.\"\r\nelse \r\n echo \"Config file does not exist. Making one...\"\r\n curl -sSL -o \/mnt\/server\/.minetest\/minetest.conf.example https:\/\/raw.githubusercontent.com\/minetest\/minetest\/master\/minetest.conf.example\r\n echo -e \"## Server settings generated by pterodactyl\\nname\\nserver_name\\nserver_description\\nserver_address\\nserver_url\\nserver_announce\\nserverlist_url\\nmotd\\nmax_users\\nbind_address\\ndefault_password\\ndefault_game\\n\\n## Custom server settings\\n\" >> \"$CONFIG_FILE\"\r\nfi\r\n\r\n# Create games folder\r\nGAMES_FOLDER=\/mnt\/server\/.minetest\/games\r\nif [ -d \"$GAMES_FOLDER\" ]; then\r\n echo \"GAMES folder already exists.\"\r\nelse \r\n echo \"GAMES folder does not exist. Making one...\"\r\n mkdir -p $GAMES_FOLDER\r\nfi\r\n\r\n# Create mods folder\r\nMOD_FOLDER=\/mnt\/server\/.minetest\/mods\r\nif [ -d \"$MOD_FOLDER\" ]; then\r\n echo \"Mods folder already exists.\"\r\nelse \r\n echo \"Mods folder does not exist. Making one...\"\r\n mkdir -p $MOD_FOLDER\r\n curl -sSL -o \"$MOD_FOLDER\"\/mods_here.txt https:\/\/raw.githubusercontent.com\/minetest\/minetest\/master\/mods\/mods_here.txt\r\nfi\r\n\r\n# Install Gamemode\r\nif [ \"$COMMUNITY_DOWNLOAD\" == \"1\" ]; then\r\n if ! [ -z \"$COMMUNITY_GAME_NAME\" ]; then\r\n\t\t if ! [ -z \"$COMMUNITY_GAME_AUTOR\" ]; then\r\n\t\t \techo \"Download $COMMUNITY_GAME_NAME\"\r\n\t\t\t\tD_URL=$(curl -s https:\/\/content.minetest.net\/packages\/$COMMUNITY_GAME_AUTOR\/$COMMUNITY_GAME_NAME\/ | grep -i download | grep packages | grep download | grep -o 'href=\".*\"' | cut -d \"=\" -f2- | egrep title= | awk -F' ' '{print $1}' | tr -d '\"')\r\n\t\t\t\tcurl -sSL -o \/mnt\/server\/.minetest\/games.zip https:\/\/content.minetest.net\/$D_URL >\/dev\/null 2>&1\r\n\t\t\t\tunzip -o \/mnt\/server\/.minetest\/games.zip -d \/mnt\/server\/.minetest\/games >\/dev\/null 2>&1\r\n\t\t\t\trm \/mnt\/server\/.minetest\/games.zip\r\n\t\t else\r\n\t\t echo \"The COMMUNITY_GAME_AUTOR variable is required to download a community game\"\r\n\t\t fi\r\n else\r\n echo \"The COMMUNITY_GAME_NAME variable is required to download a community game\"\r\n fi\r\nfi\r\n\r\n# Done!\r\necho \"Installation was successfully completed!\"", + "container": "debian:bullseye-slim", "entrypoint": "bash" } }, @@ -189,4 +189,4 @@ "field_type": "text" } ] -} \ No newline at end of file +}