eggs/game_eggs/gta/altv/egg-alt--v.json

69 lines
13 KiB
JSON
Raw Normal View History

2020-01-03 04:26:05 +08:00
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
2021-01-23 13:42:33 +08:00
"version": "PTDL_v1",
"update_url": null
2020-01-03 04:26:05 +08:00
},
2021-01-31 21:28:18 +08:00
"exported_at": "2021-01-31T13:27:52+00:00",
2020-01-03 04:26:05 +08:00
"name": "alt:V",
"author": "parker@parkervcp.com",
"description": "alt:V Multiplayer a third-party multiplayer modification for Grand Theft Auto: V",
2021-01-23 13:42:33 +08:00
"features": null,
"images": [
2021-01-28 19:44:34 +08:00
"quay.io\/parkervcp\/pterodactyl-images:game_altv"
2021-01-23 13:42:33 +08:00
],
"file_denylist": "",
2021-01-31 21:33:22 +08:00
"startup": "chmod +x .\/altv-server && .\/altv-server",
2020-01-03 04:26:05 +08:00
"config": {
2021-01-23 13:48:33 +08:00
"files": "{\r\n \"server.cfg\": {\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 \"update.cfg\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"branch\": \"{{server.build.env.BUILD}}\"\r\n }\r\n }\r\n}",
2020-01-03 04:26:05 +08:00
"startup": "{\r\n \"done\": \"Server started\"\r\n}",
"logs": "{}",
"stop": "^C"
},
"scripts": {
"installation": {
2021-01-31 21:28:18 +08:00
"script": "#!\/bin\/bash\r\n#\r\n# Script Name: update.sh\r\n#\r\n# Author: Lhoerion\r\n#\r\n# Description: The following script compares SHA-1 hashes of remote and local alt:V files. If local file is missing or outdated, script automatically downloads it to script directory.\r\n# Old files are preserved as *.old. Script also keep track of current branch and build. Server start script gets created if missing.\r\n#\r\n# Run Information: This script is run manually.\r\n# Dependencies: coreutils, wget, >=jq_1.4, pcregrep\r\n#\r\n\r\napt update\r\napt install -y libatomic1 zip unzip jq curl wget libc-bin\r\ncd \/mnt\/server\r\n\r\nnoBackup=false\r\nnoLogFile=false\r\ndryRun=false\r\nsilent=false\r\nfor arg in \"$@\"\r\ndo\r\n if [ $arg = '--no-logfile' ]; then\r\n noLogFile=true\r\n elif [ $arg = '--no-backup' ]; then\r\n noBackup=true\r\n elif [ $arg = '--dry-run' ]; then\r\n dryRun=true\r\n elif [ $arg = '--silent' ]; then\r\n silent=true\r\n fi\r\ndone\r\nfiles=()\r\nprintAndLog() {\r\n if [[ \"$silent\" == false ]]; then\r\n outFd=1\r\n else\r\n exec {outFd}>\/dev\/null\r\n fi\r\n if [ \"$2\" = 'ERR' ]; then\r\n printf \"\\e[91m[$(date +%T)][Error] $1\\e[39m\" |& ([ $noLogFile != true ] && tee -a 'update.log' >& $outFd || cat)\r\n elif [ \"$2\" = 'WARN' ]; then\r\n printf \"\\e[93m[$(date +%T)][Warning] $1\\e[39m\" |& ([ $noLogFile != true ] && tee -a 'update.log' >& $outFd || cat)\r\n elif [ \"$2\" = 'APP' ]; then\r\n printf \"$1\" |& ([ $noLogFile != true ] && tee -a 'update.log' >& $outFd || cat)\r\n else\r\n printf \"[$(date +%T)] $1\" |& ([ $noLogFile != true ] && tee -a 'update.log' >& $outFd || cat)\r\n fi\r\n}\r\nsemVerCmp() {\r\n declare -r \"semVerRegex=^(0|[1-9]\\d*)(?:\\.(0|[1-9]\\d*))?\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\"\r\n local matchA=(${1##v})\r\n local matchB=(${2##v})\r\n for i in {1..5}\r\n do\r\n matchA+=(`echo ${1##v} | pcregrep \"-o$i\" $semVerRegex`)\r\n matchB+=(`echo ${2##v} | pcregrep \"-o$i\" $semVerRegex`)\r\n done\r\n if [ ${1##v} == ${2##v} ]; then\r\n echo 0 && return 0\r\n fi\r\n if [ \\( -z $matchA[4] \\) -a \\( ! -z $matchB[4] \\) ]; then\r\n echo 1 && return 0\r\n elif [ \\( ! -z $matchA[4] \\) -a \\( -z $matchB[4] \\) ]; then\r\n echo -1 && return 0\r\n fi\r\n local i=0\r\n for a in ${matchA[@]}\r\n do\r\n local b=\"${matchB[$i]}\"\r\n if [ \\( $i -eq 2 \\) -a \\( \\( -z $a \\) -o \\( -z $b \\) \\) ]; then\r\n continue\r\n fi\r\n if [[ $a > $b ]]; then\r\n echo 1 && return 0\r\n elif [[ $a < $b ]]; then\r\n echo -1 && return 0\r\n fi\r\n i=$((i + 1))\r\n done\r\n echo 0 && return 0\r\n}\r\nfetchUpdateData() {\r\n updateData=$(curl -s \"https:\/\/cdn.altv.mp\/server\/$localBranch\/x64_linux\/update.json\" -A 'AltPublicAgent')\r\n echo $updateData | jq -e '.' >\/dev\/null 2>&1\r\n if [ $? -ne 0 ]; then\r\n printAndLog \"Failed to check for update, try again later\\n\" 'ERR'\r\n exit 1\r\n fi\r\n str='. | to_entries | map(if .key==\"hashList\" then {\"key\":.key} + {\"value\":(.value | to_entries | map(. + {\"value\":[.value, \"%s\"]}) | from_entries)} else . end) | from_entries'\r\n local updateTmp=($(mktemp '\/tmp\/update.sh.XXX'))\r\n echo '{}' > ${updateTmp[0]}\r\n echo $updateData | jq -c \"$(printf \"$str\" 'server')\" > ${updateTmp[0]}\r\n for (( i=0; i < ${#modules[@]}; i++ ))\r\n do\r\n if [[ \"${modules[$i]}\" == 'csharp-module' ]]; then\r\n modules[$i]='coreclr-module'\r\n fi\r\n local moduleName=${modules[$i]}\r\n updateData=$(curl -s \"https:\/\/cdn.altv.mp\/$moduleName\/$localBranch\/x64_linux\/update.json\" -A 'AltPublicAgent')\r\n echo $updateData | jq -e '.' >\/dev\/null 2>&1\r\n if [ $? -ne 0 ]; then\r\n printAndLog \"Failed to check for $moduleName update\\n\" 'WARN'\r\n else\r\n if [[ \"$moduleName\" == 'csharp-module' ]]; then\r\n if [[ $(echo $update
2020-01-03 04:26:05 +08:00
"container": "debian:buster-slim",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "ld lib path",
2021-01-23 13:42:33 +08:00
"description": "Needed to load modules correctly. Best left at default.",
2020-01-03 04:26:05 +08:00
"env_variable": "LD_LIBRARY_PATH",
"default_value": ".",
"user_viewable": false,
"user_editable": false,
2020-01-03 04:26:05 +08:00
"rules": "required|string|max:20"
},
{
2021-01-23 13:42:33 +08:00
"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",
2020-01-03 04:26:05 +08:00
"env_variable": "BUILD",
"default_value": "release",
"user_viewable": true,
"user_editable": true,
2020-01-03 04:26:05 +08:00
"rules": "required|string|max:20"
},
{
"name": "Server Password",
"description": "The password to join the server",
"env_variable": "PASSWORD",
"default_value": "ChangeMe",
"user_viewable": true,
"user_editable": true,
2020-01-03 04:26:05 +08:00
"rules": "nullable|string|min:6"
},
{
"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"
2020-01-03 04:26:05 +08:00
}
]
2021-01-23 13:42:33 +08:00
}