games-standalone/gta/altv/egg-alt--v.json
Oratorian 5c0432f52a
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>
2024-08-31 13:13:43 +02:00

77 lines
5.2 KiB
JSON

{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2024-08-25T08:48:50+00:00",
"name": "alt:V",
"author": "parker@parkervcp.com",
"uuid": "25408807-f3c9-47d0-bed1-1d3f071b869e",
"description": "alt:V Multiplayer a third-party multiplayer modification for Grand Theft Auto: V",
"features": [],
"docker_images": {
"ALT-V": "ghcr.io\/parkervcp\/games:altv"
},
"file_denylist": [],
"startup": ".\/altv-server",
"config": {
"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}",
"logs": "{}",
"stop": "quit"
},
"scripts": {
"installation": {
"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\"",
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
{
"sort": 1,
"name": "ld lib path",
"description": "Needed to load modules correctly. Best left at default.",
"env_variable": "LD_LIBRARY_PATH",
"default_value": ".",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:20",
"field_type": "text"
},
{
"sort": 2,
"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",
"env_variable": "BUILD",
"default_value": "release",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:release,rc,dev",
"field_type": "text"
},
{
"sort": 3,
"name": "Server Password",
"description": "The password to join the server",
"env_variable": "PASSWORD",
"default_value": "ChangeMe",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|min:6",
"field_type": "text"
},
{
"sort": 4,
"name": "Server Description",
"description": "Description for the server.",
"env_variable": "SERVER_DESC",
"default_value": "A Pterodactyl Hosted Server",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
}
]
}