games-standalone/gta/openmp/egg-pterodactyl-open-m-p.json

52 lines
3.5 KiB
JSON
Raw Normal View History

2024-06-02 20:44:28 +02:00
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL",
"meta": {
"update_url": null,
"version": "PTDL_v2"
},
"exported_at": "2024-06-01T00:16:57+00:00",
"name": "OpenMP",
"author": "vedrancappone@gmail.com",
"description": "A multiplayer mod for Grand Theft Auto: San Andreas that is fully backwards compatible with San Andreas Multiplayer.",
"features": null,
"docker_images": {
"Samp": "ghcr.io/parkervcp/games:samp"
},
"file_denylist": [],
"startup": "./omp-server",
"config": {
"files": "{\r\n \"config.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"network.port\": \"{{server.build.default.port}}\",\r\n \"rcon.password\": \"{{server.build.env.RCON_PASSWORD}}\"\r\n }\r\n }\r\n}",
"logs": "{}",
"startup": "{\r\n \"done\": \"started on port\"\r\n}",
"stop": "exit"
},
"scripts": {
"installation": {
"container": "ghcr.io/parkervcp/installers:debian",
"entrypoint": "bash",
"script": "#!/bin/bash\r\n\r\napt -y install curl git jq tar\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https://api.github.com/repos/openmultiplayer/open.mp/releases/latest\")\r\nRELEASES=$(curl --silent \"https://api.github.com/repos/openmultiplayer/open.mp/releases\")\r\nMATCH=open.mp-linux-x86-dynssl\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; 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 \"defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -linux-x86 | head -1)\r\n fi\r\nfi\r\n\r\necho \"running: curl -sSL -o openmp.tar.gz ${DOWNLOAD_URL}\"\r\ncurl -sSL -o openmp.tar.gz ${DOWNLOAD_URL}\r\n\r\nmkdir -p /mnt/server\r\ntar -xzvf openmp.tar.gz --strip-components=1 -C /mnt/server/\r\n\r\ncd /mnt/server || exit\r\n\r\necho \"creating default config\"\r\n\r\nif [ -e config.json ]; then\r\n echo \"server config file exists\"\r\nelse\r\n echo \"Downloading default OpenMp config\"\r\n curl https://raw.githubusercontent.com/parkervcp/eggs/master/game_eggs/gta/openmp/config.json \u003e\u003e config.json\r\nfi\r\n\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\""
}
},
"variables": [
{
"name": "RCON Password",
"description": "The password for RCON",
"env_variable": "RCON_PASSWORD",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:32",
"field_type": "text"
},
{
"name": "Version",
"description": "The version you want to install",
"env_variable": "VERSION",
"default_value": "latest",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20",
"field_type": "text"
}
]
}