Update ALT:V config parser (#28)

* Update egg-pterodactyl-alt--v.json

Fixed config parser since alt:v uses equal signs not colons to seperate variable and value

* update pelican one

---------

Co-authored-by: Quinten <67589015+QuintenQVD0@users.noreply.github.com>
This commit is contained in:
Oratorian 2024-08-31 13:13:43 +02:00 committed by GitHub
parent 77ee6507be
commit 5c0432f52a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 20 deletions

View File

@ -4,19 +4,19 @@
"version": "PTDL_v2", "version": "PTDL_v2",
"update_url": null "update_url": null
}, },
"exported_at": "2024-06-01T00:17:23+00:00", "exported_at": "2024-08-25T08:48:50+00:00",
"name": "alt:V", "name": "alt:V",
"author": "parker@parkervcp.com", "author": "parker@parkervcp.com",
"uuid": "25408807-f3c9-47d0-bed1-1d3f071b869e", "uuid": "25408807-f3c9-47d0-bed1-1d3f071b869e",
"description": "alt:V Multiplayer a third-party multiplayer modification for Grand Theft Auto: V", "description": "alt:V Multiplayer a third-party multiplayer modification for Grand Theft Auto: V",
"features": null, "features": [],
"docker_images": { "docker_images": {
"ALT:V": "ghcr.io\/parkervcp\/games:altv" "ALT-V": "ghcr.io\/parkervcp\/games:altv"
}, },
"file_denylist": [], "file_denylist": [],
"startup": ".\/altv-server", "startup": ".\/altv-server",
"config": { "config": {
"files": "{\r\n \"server.toml\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"host:\": \"host: 0.0.0.0\",\r\n \"port:\": \"port: {{server.build.default.port}}\",\r\n \"password:\": \"password: {{server.build.env.PASSWORD}}\",\r\n \"description:\": \"description: {{server.build.env.SERVER_DESC}}\"\r\n }\r\n }\r\n}", "files": "{\n \"server.toml\": {\n \"parser\": \"file\",\n \"find\": {\n \"host\": \"host = '0.0.0.0'\",\n \"port\": \"port = '{{server.build.default.port}}'\",\n \"password\": \"password = '{{server.build.env.PASSWORD}}'\",\n \"description\": \"description = '{{server.build.env.SERVER_DESC}}'\"\n }\n }\n}",
"startup": "{\r\n \"done\": \"Server started\"\r\n}", "startup": "{\r\n \"done\": \"Server started\"\r\n}",
"logs": "{}", "logs": "{}",
"stop": "quit" "stop": "quit"
@ -30,6 +30,7 @@
}, },
"variables": [ "variables": [
{ {
"sort": 1,
"name": "ld lib path", "name": "ld lib path",
"description": "Needed to load modules correctly. Best left at default.", "description": "Needed to load modules correctly. Best left at default.",
"env_variable": "LD_LIBRARY_PATH", "env_variable": "LD_LIBRARY_PATH",
@ -37,10 +38,10 @@
"user_viewable": false, "user_viewable": false,
"user_editable": false, "user_editable": false,
"rules": "required|string|max:20", "rules": "required|string|max:20",
"sort": null,
"field_type": "text" "field_type": "text"
}, },
{ {
"sort": 2,
"name": "Release Branch", "name": "Release Branch",
"description": "The supported versions are release, rc, dev (default: release).\r\nIf you don't know what you are doing leave it on release", "description": "The supported versions are release, rc, dev (default: release).\r\nIf you don't know what you are doing leave it on release",
"env_variable": "BUILD", "env_variable": "BUILD",
@ -48,10 +49,10 @@
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|string|in:release,rc,dev", "rules": "required|string|in:release,rc,dev",
"sort": null,
"field_type": "text" "field_type": "text"
}, },
{ {
"sort": 3,
"name": "Server Password", "name": "Server Password",
"description": "The password to join the server", "description": "The password to join the server",
"env_variable": "PASSWORD", "env_variable": "PASSWORD",
@ -59,10 +60,10 @@
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "nullable|string|min:6", "rules": "nullable|string|min:6",
"sort": null,
"field_type": "text" "field_type": "text"
}, },
{ {
"sort": 4,
"name": "Server Description", "name": "Server Description",
"description": "Description for the server.", "description": "Description for the server.",
"env_variable": "SERVER_DESC", "env_variable": "SERVER_DESC",
@ -70,7 +71,6 @@
"user_viewable": true, "user_viewable": true,
"user_editable": true, "user_editable": true,
"rules": "required|string", "rules": "required|string",
"sort": null,
"field_type": "text" "field_type": "text"
} }
] ]

View File

@ -1,30 +1,30 @@
{ {
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL", "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": { "meta": {
"update_url": null, "version": "PTDL_v2",
"version": "PTDL_v2" "update_url": null
}, },
"exported_at": "2024-06-01T00:17:23+00:00", "exported_at": "2024-08-25T10:29:40+02:00",
"name": "alt:V", "name": "alt:V",
"author": "parker@parkervcp.com", "author": "parker@parkervcp.com",
"description": "alt:V Multiplayer a third-party multiplayer modification for Grand Theft Auto: V", "description": "alt:V Multiplayer a third-party multiplayer modification for Grand Theft Auto: V",
"features": null, "features": null,
"docker_images": { "docker_images": {
"ALT:V": "ghcr.io/parkervcp/games:altv" "ALT-V": "ghcr.io\/parkervcp\/games:altv"
}, },
"file_denylist": [], "file_denylist": [],
"startup": "./altv-server", "startup": ".\/altv-server",
"config": { "config": {
"files": "{\r\n \"server.toml\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"host:\": \"host: 0.0.0.0\",\r\n \"port:\": \"port: {{server.build.default.port}}\",\r\n \"password:\": \"password: {{server.build.env.PASSWORD}}\",\r\n \"description:\": \"description: {{server.build.env.SERVER_DESC}}\"\r\n }\r\n }\r\n}", "files": "{\r\n \"server.toml\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"host\": \"host = '0.0.0.0'\",\r\n \"port\": \"port = '{{server.build.default.port}}'\",\r\n \"password\": \"password = '{{server.build.env.PASSWORD}}'\",\r\n \"description\": \"description = '{{server.build.env.SERVER_DESC}}'\"\r\n }\r\n }\r\n}",
"logs": "{}",
"startup": "{\r\n \"done\": \"Server started\"\r\n}", "startup": "{\r\n \"done\": \"Server started\"\r\n}",
"logs": "{}",
"stop": "quit" "stop": "quit"
}, },
"scripts": { "scripts": {
"installation": { "installation": {
"container": "ghcr.io/parkervcp/installers:debian", "script": "#!\/bin\/bash\r\n#\r\n\r\napt update\r\napt install -y wget jq curl \r\n\r\ncd \/mnt\/server\r\nNEWVERSION=$(curl -sSL https:\/\/cdn.alt-mp.com\/server\/${BUILD}\/x64_linux\/update.json | jq -r .version)\r\n\r\n\r\nif [ -f \"\/mnt\/server\/altv-server\" ]; then\r\n CURRENTVERSION=$(cat update.json | jq -r .version)\r\n if [[ \"${CURRENTVERSION}\" == \"${NEWVERSION}\" ]]; then\r\n echo \"No update found\"\r\n exit 0\r\n fi\r\n echo \"Backing up version ${CURRENTVERSION}\"\r\n mkdir -p \/mnt\/server\/backup\/${CURRENTVERSION}\/data\r\n mv altv-server \/mnt\/server\/backup\/${CURRENTVERSION}\/\r\n cd \/mnt\/server\/data\r\n mv clothes.bin \/mnt\/server\/backup\/${CURRENTVERSION}\/data\r\n mv vehmodels.bin \/mnt\/server\/backup\/${CURRENTVERSION}\/data\r\n mv vehmods.bin \/mnt\/server\/backup\/${CURRENTVERSION}\/data\r\n mv pedmodels.bin \/mnt\/server\/backup\/${CURRENTVERSION}\/data\r\n mv weaponmodels.bin \/mnt\/server\/backup\/${CURRENTVERSION}\/data\r\n mv rpfdata.bin \/mnt\/server\/backup\/${CURRENTVERSION}\/data\r\n rm \/mnt\/server\/update.json\r\nfi\r\n\r\n\r\ncd \/mnt\/server\r\n\r\n\r\necho \"Installing version: ${NEWVERSION}\"\r\nwget -q https:\/\/cdn.alt-mp.com\/server\/${BUILD}\/x64_linux\/altv-server\r\nwget -q https:\/\/cdn.alt-mp.com\/server\/${BUILD}\/x64_linux\/update.json\r\nchmod +x .\/altv-server\r\n\r\n\r\nmkdir -p \/mnt\/server\/data\r\ncd \/mnt\/server\/data\r\n\r\nwget -q https:\/\/cdn.alt-mp.com\/data\/${BUILD}\/data\/vehmodels.bin\r\nwget -q https:\/\/cdn.alt-mp.com\/data\/${BUILD}\/data\/vehmods.bin\r\nwget -q https:\/\/cdn.alt-mp.com\/data\/${BUILD}\/data\/clothes.bin\r\nwget -q https:\/\/cdn.alt-mp.com\/data\/${BUILD}\/data\/pedmodels.bin\r\nwget -q https:\/\/cdn.alt-mp.com\/data\/${BUILD}\/data\/weaponmodels.bin\r\nwget -q https:\/\/cdn.alt-mp.com\/data\/${BUILD}\/data\/rpfdata.bin\r\n\r\n\r\n\r\n\r\ncd \/mnt\/server\r\nif [ ! -f \"\/mnt\/server\/server.toml\" ]; then\r\ncat << EOF >> server.toml\r\nname = 'alt:V Server'\r\nhost = '0.0.0.0'\r\nport = ${SERVER_PORT}\r\nplayers = 128\r\npassword = '${PASSWORD}'\r\nannounce = false\r\ntoken = 'YOUR_TOKEN'\r\ngamemode = 'Freeroam'\r\nwebsite = 'example.com'\r\nlanguage = 'en'\r\ndescription = '${SERVER_DESC}'\r\nmodules = []\r\nresources = []\r\nEOF\r\nfi\r\n\r\nmkdir -p resources\/\r\n\r\necho -e \"install complete\"",
"entrypoint": "bash", "container": "ghcr.io\/parkervcp\/installers:debian",
"script": "#!/bin/bash\r\n#\r\n\r\napt update\r\napt install -y wget jq curl \r\n\r\ncd /mnt/server\r\nNEWVERSION=$(curl -sSL https://cdn.alt-mp.com/server/${BUILD}/x64_linux/update.json | jq -r .version)\r\n\r\n\r\nif [ -f \"/mnt/server/altv-server\" ]; then\r\n CURRENTVERSION=$(cat update.json | jq -r .version)\r\n if [[ \"${CURRENTVERSION}\" == \"${NEWVERSION}\" ]]; then\r\n echo \"No update found\"\r\n exit 0\r\n fi\r\n echo \"Backing up version ${CURRENTVERSION}\"\r\n mkdir -p /mnt/server/backup/${CURRENTVERSION}/data\r\n mv altv-server /mnt/server/backup/${CURRENTVERSION}/\r\n cd /mnt/server/data\r\n mv clothes.bin /mnt/server/backup/${CURRENTVERSION}/data\r\n mv vehmodels.bin /mnt/server/backup/${CURRENTVERSION}/data\r\n mv vehmods.bin /mnt/server/backup/${CURRENTVERSION}/data\r\n mv pedmodels.bin /mnt/server/backup/${CURRENTVERSION}/data\r\n mv weaponmodels.bin /mnt/server/backup/${CURRENTVERSION}/data\r\n mv rpfdata.bin /mnt/server/backup/${CURRENTVERSION}/data\r\n rm /mnt/server/update.json\r\nfi\r\n\r\n\r\ncd /mnt/server\r\n\r\n\r\necho \"Installing version: ${NEWVERSION}\"\r\nwget -q https://cdn.alt-mp.com/server/${BUILD}/x64_linux/altv-server\r\nwget -q https://cdn.alt-mp.com/server/${BUILD}/x64_linux/update.json\r\nchmod +x ./altv-server\r\n\r\n\r\nmkdir -p /mnt/server/data\r\ncd /mnt/server/data\r\n\r\nwget -q https://cdn.alt-mp.com/data/${BUILD}/data/vehmodels.bin\r\nwget -q https://cdn.alt-mp.com/data/${BUILD}/data/vehmods.bin\r\nwget -q https://cdn.alt-mp.com/data/${BUILD}/data/clothes.bin\r\nwget -q https://cdn.alt-mp.com/data/${BUILD}/data/pedmodels.bin\r\nwget -q https://cdn.alt-mp.com/data/${BUILD}/data/weaponmodels.bin\r\nwget -q https://cdn.alt-mp.com/data/${BUILD}/data/rpfdata.bin\r\n\r\n\r\n\r\n\r\ncd /mnt/server\r\nif [ ! -f \"/mnt/server/server.toml\" ]; then\r\ncat \u003c\u003c EOF \u003e\u003e server.toml\r\nname = 'alt:V Server'\r\nhost = '0.0.0.0'\r\nport = ${SERVER_PORT}\r\nplayers = 128\r\npassword = '${PASSWORD}'\r\nannounce = false\r\ntoken = 'YOUR_TOKEN'\r\ngamemode = 'Freeroam'\r\nwebsite = 'example.com'\r\nlanguage = 'en'\r\ndescription = '${SERVER_DESC}'\r\nmodules = []\r\nresources = []\r\nEOF\r\nfi\r\n\r\nmkdir -p resources/\r\n\r\necho -e \"install complete\"" "entrypoint": "bash"
} }
}, },
"variables": [ "variables": [
@ -69,4 +69,4 @@
"field_type": "text" "field_type": "text"
} }
] ]
} }