diff --git a/README.md b/README.md index fadd17b7..e0ee5402 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Parkers Pterodactyl eggs repo +# Parkers Pterodactyl eggs repo I am working on adding a large collection of public eggs for the Pterodactyl community. @@ -76,6 +76,8 @@ If you are reading this it looks like you are looking to add an egg to your serv [ET Legacy](/enemy_territory/etlegacy) +[FTL: Tachyon](/ftl/tachyon) + [Factorio](/factorio) * [Vanilla](/factorio/factorio) * [ModUpdate](/factorio/factorio-modupdate) @@ -178,7 +180,7 @@ If you are reading this it looks like you are looking to add an egg to your serv * [The Forest](/steamcmd_servers/the_forest) * [Team Fortress 2 Classic](/steamcmd_servers/team_fortress_2_classic) * [Unturned](/steamcmd_servers/unturned) -* [Valheim] (/steamcmd_servers/valheim) +* [Valheim](/steamcmd_servers/valheim) [Teeworlds](/teeworlds) * [Teeworlds](/teeworlds/teeworlds) diff --git a/ftl/tachyon/README.MD b/ftl/tachyon/README.MD new file mode 100644 index 00000000..c4c03499 --- /dev/null +++ b/ftl/tachyon/README.MD @@ -0,0 +1,15 @@ +# Tachyon + +Tachyon is a multiplayer FTL server and client. + +## Server Ports + +The Tachyon server requires a single port for access. + +| Port | default | +|-------|---------| +| Game | 30303 | + +## Server Specific + +Latest client and standalone server can be found at https://github.com/Dav-Edward/TachyonsCE/releases diff --git a/ftl/tachyon/egg-tachyon.json b/ftl/tachyon/egg-tachyon.json new file mode 100644 index 00000000..a2b299d5 --- /dev/null +++ b/ftl/tachyon/egg-tachyon.json @@ -0,0 +1,31 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v1", + "update_url": null + }, + "exported_at": "2021-02-09T11:53:05-08:00", + "name": "Tachyon", + "author": "alex.chang-lam@protonmail.com", + "description": "A multiplayer version of FTL.", + "features": null, + "images": [ + "quay.io\/pterodactyl\/core:java-11" + ], + "file_denylist": "", + "startup": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -Dterminal.jline=false -Dterminal.ansi=true -jar TachyonsCEServer.jar", + "config": { + "files": "{}", + "startup": "{\r\n \"done\": \"[Server] SERVER STARTED.\",\r\n \"userInteraction\": []\r\n}", + "logs": "{}", + "stop": "\/exit" + }, + "scripts": { + "installation": { + "script": "#! \/bin\/bash\r\n\r\nGITHUB_PACKAGE=Dav-Edward\/TachyonsCE\r\nMATCH=TachyonsCE\r\n\r\napt update\r\napt install -y curl jq file unzip\r\n\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir -p \/mnt\/server\/\r\nfi\r\n\r\ncd \/mnt\/server\/\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\n\r\nif [ \"$(echo ${LATEST_JSON} | jq -r '.message')\" != \"Not Found\" ] && [[ -z \"${VERSION}\" || \"${VERSION}\" == \"latest\" ]]; then\r\n echo -e \"grabbing latest version\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelif [ \"$(echo ${LATEST_JSON} | jq -r '.message')\" == \"Not Found\" ]; then\r\n ## emergency fallback if latest isn't found\r\n ## grabs the latest release even it it's a pre-release\r\n echo -e \"grabbing latest pre-release\"\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r '.[0].assets[].browser_download_url' | grep -i ${MATCH})\r\nelse\r\n echo -e \"grabbing version $VERSION\"\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)\r\n fi\r\nfi\r\n\r\nif [ ! -z \"${DOWNLOAD_URL}\" ]; then \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_URL}; then\r\n echo -e \"link is valid. setting download link to ${DOWNLOAD_URL}\"\r\n VALIDATED_URL=${DOWNLOAD_URL}\r\n else \r\n echo -e \"link is invalid closing out\"\r\n exit 2\r\n fi\r\nfi\r\n\r\ncurl -sSL -o ${VALIDATED_URL##*\/} ${VALIDATED_URL}\r\n\r\nFILETYPE=$(file -F ',' ${VALIDATED_URL##*\/} | cut -d',' -f2 | cut -d' ' -f2)\r\nif [ \"$FILETYPE\" == \"gzip\" ]; then\r\n tar xzvf ${VALIDATED_URL##*\/}\r\nelif [ \"$FILETYPE\" == \"Zip\" ]; then\r\n unzip ${VALIDATED_URL##*\/}\r\nelif [ \"$FILETYPE\" == \"XZ\" ]; then\r\n tar xvf ${VALIDATED_URL##*\/}\r\nelse\r\n echo -e \"unknown filetype. Exiting\"\r\n # exit 2 \r\nfi\r\n\r\n#pull version and format folder name for renaming\r\nFOLDER=$(echo ${LATEST_JSON} | jq .tag_name | tr -d 'v\"')\r\n\r\n#move all server files out\r\ncp -r .\/TachyonsCE_${FOLDER}\/server\/* \/mnt\/server\r\n\r\n#remove zip and unneeded client-side and dev files\r\nrm -rf TachyonsCE_${FOLDER}\r\nrm ${VALIDATED_URL##*\/}\r\n\r\nchmod +x TachyonsCEServer.jar", + "container": "debian:buster-slim", + "entrypoint": "bash" + } + }, + "variables": [] +} \ No newline at end of file diff --git a/gta/altv/egg-alt--v.json b/gta/altv/egg-alt--v.json index d305748c..cd2acfca 100644 --- a/gta/altv/egg-alt--v.json +++ b/gta/altv/egg-alt--v.json @@ -1,23 +1,28 @@ { "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", "meta": { - "version": "PTDL_v1" + "version": "PTDL_v1", + "update_url": null }, - "exported_at": "2020-10-16T12:30:37+00:00", + "exported_at": "2021-01-31T13:27:52+00:00", "name": "alt:V", "author": "parker@parkervcp.com", "description": "alt:V Multiplayer a third-party multiplayer modification for Grand Theft Auto: V", - "image": "quay.io\/parkervcp\/pterodactyl-images:debian_dotnet", - "startup": "sleep 2 && .\/altv-server", + "features": null, + "images": [ + "quay.io\/parkervcp\/pterodactyl-images:game_altv" + ], + "file_denylist": "", + "startup": "chmod +x .\/altv-server && .\/altv-server", "config": { - "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}", + "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}", "startup": "{\r\n \"done\": \"Server started\"\r\n}", "logs": "{}", "stop": "^C" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# AltV Install Script\r\n#\r\n# Server Files: \/mnt\/server\r\n# BUILD=stable ## this should be an egg variable.\r\nBASE_URL=\"https:\/\/cdn.altv.mp\/\" ## Where the files are stored.\r\n\r\n## install required dependancies.\r\nfunction install_deps () {\r\n apt update\r\n apt install -y libatomic1 zip unzip jq curl wget\r\n echo -e \"deps installed\"\r\n echo -e\r\n}\r\n\r\n## check the has on files and compare to a remote source.\r\n## usage 'check_hash \"file\" \"remote_hash_source\"'\r\nfunction check_hash () {\r\n echo -e \"Checking for file ${1}\"\r\n echo -e \"running: curl -sSL ${2} | jq -r --arg FILENAME \\\"${3}\\\" '.hashList | .[\\$FILENAME]'\"\r\n hash=$(curl -sSL ${2} | jq -r --arg FILENAME ${3} '.hashList | .[$FILENAME]')\r\n echo -e \"hash: $hash\"\r\n\r\n if [ -f ${2} ]; then\r\n\r\n echo -e \"hash is $(sha1sum ${1} | awk '{ print $1 }')\"\r\n echo -e \"current has is ${hash}\"\r\n\r\n if [ \"$(sha1sum ${2} | awk '{ print $1 }')\" == \"${hash}\" ]; then\r\n echo -e \"Hash matched\"\r\n echo -e \"No need to download new file.\"\r\n return 0\r\n else\r\n echo -e \"Hash didn't match\"\r\n echo -e \"Need to download the correct version\"\r\n return 1\r\n fi\r\n else\r\n echo \"No file found\"\r\n return 1\r\n fi\r\n}\r\n\r\n## makes sure a download link is valid.\r\nfunction validate_download () {\r\n DOWNLOAD_URL=${1}\r\n\r\n echo -e \"Download url is ${DOWNLOAD_URL}\"\r\n\r\n if [ ! -z \"${DOWNLOAD_URL}\" ]; then \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_URL}; then\r\n echo -e \"link is valid. setting download link to ${DOWNLOAD_URL}\"\r\n DOWNLOAD_LINK=${DOWNLOAD_URL}\r\n else \r\n echo -e \"link is invalid closing out\"\r\n exit 2\r\n fi\r\n fi\r\n\r\n}\r\n\r\nfunction download_files () {\r\n ## validate download link and get files\r\n validate_download ${1}\r\n echo -e \"running wget ${DOWNLOAD_URL} -O ${2}\"\r\n wget ${DOWNLOAD_URL} -O ${2}\r\n}\r\n\r\n## This is a file array for files to get downloaded.\r\n## They are all comma separated lists.\r\n## remote folder (0), json file with hashes (1), file name in json file (2), file name (3), file folder (4), extra commands (5)\r\nfile_array=( \\\r\n\"server\/${BUILD}\/x64_linux\/\",\"update.json\",\"altv-server\",\"altv-server\",\/mnt\/server\/,execute \\\r\n\"server\/${BUILD}\/x64_linux\/\",\"update.json\",\"data\/vehmodels.bin\",\"vehmodels.bin\",\/mnt\/server\/data\/ \\\r\n\"server\/${BUILD}\/x64_linux\/\",\"update.json\",\"data\/vehmods.bin\",\"vehmods.bin\",\/mnt\/server\/data\/ \\\r\n\"others\/\",,\"server.cfg\",server.cfg,\/mnt\/server\/ \\\r\n\"js-module\/${BUILD}\/x64_linux\/\",\"update.json\",\"modules\/js-module\/libnode.so.72\",\"libnode.so.72\",\/mnt\/server\/ \\\r\n\"js-module\/${BUILD}\/x64_linux\/\",\"update.json\",\"modules\/js-module\/libjs-module.so\",\"libjs-module.so\",\/mnt\/server\/modules\/ \\\r\n\"coreclr-module\/${BUILD}\/x64_linux\/\",,\"AltV.Net.Host.dll\",\"AltV.Net.Host.dll\",\/mnt\/server\/ \\\r\n\"coreclr-module\/${BUILD}\/x64_linux\/\",,\"AltV.Net.Host.runtimeconfig.json\",\"AltV.Net.Host.runtimeconfig.json\",\/mnt\/server\/ \\\r\n\"coreclr-module\/stable\/x64_linux\/\",\"update.json\",\"modules\/libcsharp-module.so\",\"libcsharp-module.so\",\/mnt\/server\/modules\/ \\\r\n\"samples\/\",,\"resources.zip\",\"resources.zip\",\/mnt\/server\/,unzip \\\r\n)\r\n\r\ninstall_deps\r\n\r\n## this goes through each value in the array and then checks the hash\r\nfor EACH in ${file_array[@]}\r\ndo\r\n ## this needs to be here to break apart the arrays.\r\n IFS=',' read -r -a array <<< \"$EACH\"\r\n\r\n if [ ! -z \"${array[1]}\" ]; then\r\n ## check hash on 'folder\/file' with 'remote file base url\/remote folder\/ json file' 'json file name' \r\n if check_hash \"${array[4]}${array[3]}\" \"${BASE_URL}${array[0]}${array[1]}\" \"${array[2]}\"; then\r\n echo -e \"file up to date\"\r\n else\r\n echo -e \"downloading most recent file\"\r\n fi\r\n ## make the directory if it doesn't exist.\r\n if [ ! -d ${array[4]} ]; then\r\n mkdir ${array[4]}\r\n fi\r\n download_files \"${BASE_URL}${array[0]}${array[2]}\" \"${array[4]}${array[3]}\"\r\n else\r\n ## make the directory if it doesn't exist.\r\n if [ ! -d ${array[4]} ]; then\r\n mkdir ${array[4]}\r\n fi\r\n download_files \"${BASE_URL}${array[0]}${array[2]}\" \"${array[4]}${array[3]}\"\r\n fi\r\n\r\n ## run extra commands if needed.\r\n case ${array[5]} in\r\n unzip)\r\n cd ${array[4]}\r\n unzip -o ${array[3]}\r\n rm ${array[3]}\r\n ;;\r\n execute)\r\n chmod +x ${array[4]}${array[3]}\r\n ;;\r\n esac\r\n\r\n# echo -e \"HashFile: ${BASE_URL}${array[0]}${array[1]}\"\r\n# echo -e \"Download URL ${BASE_URL}${array[0]}${array[2]}\"\r\n# echo -e \"Filename ${array[3]}\"\r\n# echo -e \"File Folder ${array[4]}\"\r\n# echo -e \"commands to run ${array[5]}\"\r\n# echo -e\r\ndone\r\n\r\necho -e \"install complete\"", + "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 $updateData | jq -c '.hashList | has(\"AltV.Net.Host.dll\")') == false ]]; then\r\n updateData=$(echo $updateData | jq '.hashList |= . + {\"AltV.Net.Host.dll\":\"'$(printf \"%0.s0\" {1..40})'\"}')\r\n updateData=$(echo $updateData | jq '.hashList |= . + {\"AltV.Net.Host.runtimeconfig.json\":\"'$(printf \"%0.s0\" {1..40})'\"}')\r\n fi\r\n if [[ $(echo $updateData | jq -c '.hashList | has(\"modules\/libcsharp-module.so\")') == false ]]; then\r\n updateData=$(echo $updateData | jq '.hashList |= . + {\"modules\/libcsharp-module.so\":\"'$(printf \"%0.s0\" {1..40})'\"}')\r\n fi\r\n fi\r\n updateTmp+=($(mktemp '\/tmp\/update.sh.XXX'))\r\n echo '{}' > \"${updateTmp[${#updateTmp[@]} - 1]}\"\r\n echo $updateData | jq -c \"$(printf \"$str\" \"$moduleName\")\" > \"${updateTmp[${#updateTmp[@]} - 1]}\"\r\n fi\r\n done\r\n updateData=$(jq -s '.[0].latestBuildNumber as $b | .[0].version as $c | reduce .[] as $x ({}; . * $x) | .latestBuildNumber=$b | .version=$c' ${updateTmp[@]})\r\n remoteBuild=\"$(echo \"$updateData\" | jq -r '.latestBuildNumber')\"\r\n [[ $remoteBuild -eq -1 ]] && remoteBuild=$(echo \"$updateData\" | jq -r '.version')\r\n}\r\nvalidateFiles() {\r\n files=()\r\n for file in $(echo $updateData | jq -r '.hashList | keys[]')\r\n do\r\n if [[ ! -e \"$file\" || $(sha1sum \"$file\" | awk '{print $1}') != \"$(echo \"$updateData\" | jq -r \".hashList.\\\"$file\\\"[0]\")\" ]]; then\r\n files+=(\"$file\")\r\n fi\r\n done\r\n if [ ! -e 'server.cfg' ]; then\r\n printAndLog \"Server file server.cfg not found, creating one . . . \"\r\n if [[ \"$dryRun\" == false ]]; then\r\n printf 'name: \"alt:V Server\"\\nhost: 0.0.0.0\\nport: 7788\\nplayers: 128\\n#password: ultra-password\\nannounce: false\\n#token: YOUR_TOKEN\\ngamemode: Freeroam\\nwebsite: example.com\\nlanguage: en\\ndescription: \"alt:V Sample Server\"\\nmodules: [\\n \\n]\\nresources: [\\n \\n]\\n' > 'server.cfg' && printAndLog 'done\\n' 'APP' || printAndLog 'failed\\n' 'APP'\r\n else\r\n printAndLog 'done\\n' 'APP'\r\n fi\r\n fi\r\n if [[ ! $localBuild =~ ^[0-9]+$ || $localBuild -ge 1232 ]]; then\r\n local nodeExist=$([ -e 'libnode.so.72' ] && echo true || echo false)\r\n local moduleExist=$([ -e 'modules\/libnode-module.so' ] && echo true || echo false)\r\n if [[ \"$nodeExist\" == true || \"$moduleExist\" == true ]]; then\r\n printAndLog \"Found old node-module files, removing . . . \"\r\n if [[ \"$dryRun\" == false ]]; then\r\n local result1=true\r\n local result2=true\r\n if [[ \"$nodeExist\" == true ]]; then\r\n rm -f 'libnode.so.72'\r\n result1=$([[ \"$?\" -eq 0 ]] && echo true || echo false)\r\n fi\r\n if [[ \"$moduleExist\" == true ]]; then\r\n rm -f 'modules\/libnode-module.so'\r\n result2=$([[ \"$?\" -eq 0 ]] && echo true || echo false)\r\n fi\r\n if [[ \"$result1\" == true && \"$result2\" == true ]]; then\r\n printAndLog 'done\\n' 'APP'\r\n else\r\n printAndLog 'failed\\n' 'APP'\r\n fi\r\n else\r\n printAndLog 'done\\n' 'APP'\r\n fi\r\n fi\r\n fi\r\n if [ $localBuild != $remoteBuild ]; then\r\n printAndLog \"Server files update is available\\n\"\r\n elif [ \"${#files[@]}\" -ne 0 ]; then\r\n printAndLog \"Server files are invalidated\/corrupted, ${#files[@]} in total\\n\"\r\n else\r\n printAndLog \"Server files are up-to-date, no action required\\n\"\r\n fi\r\n\r\n if [[ \"$dryRun\" == false ]]; then\r\n localBuild=$remoteBuild\r\n modulesTemp=\"\"\r\n for (( i=0; i < ${#modules[@]}; i++ ))\r\n do\r\n modulesTemp+=\"\\\"${modules[$i]}\\\"\"\r\n if [ $(($i + 1)) -ne ${#modules[@]} ]; then\r\n modulesTemp+=','\r\n fi\r\n done\r\n if [[ $localBuild =~ ^[0-9]+$ ]]; then\r\n printf '{\"branch\":\"%s\",\"build\":%d,\"modules\":[%s]}' $localBranch $localBuild $modulesTemp | jq '.' > 'update.cfg'\r\n else\r\n printf '{\"branch\":\"%s\",\"build\":\"%s\",\"modules\":[%s]}' $localBranch $localBuild $modulesTemp | jq '.' > 'update.cfg'\r\n fi\r\n fi\r\n }\r\n downloadFiles() {\r\n if [ \"${#files[@]}\" -eq 0 ]; then\r\n return\r\n fi\r\n for file in ${files[@]}\r\n do\r\n dlType=\"$(echo \"$updateData\" | jq -r \".hashList.\\\"$file\\\"[1]\")\"\r\n outDir=\"$(dirname $file)\"\r\n printAndLog \"Downloading file $file . . . \"\r\n if [[ \"$dryRun\" == false ]]; then\r\n if [[ \"$noBackup\" == false && -e \"$file\" ]]; then\r\n mv \"$file\" \"$file.old\"\r\n fi\r\n if [[ ! -e \"$outDir\/\" ]]; then\r\n mkdir -p \"$outDir\/\"\r\n fi\r\n wget \"https:\/\/cdn.altv.mp\/$dlType\/$localBranch\/x64_linux\/${file}?build=$localBuild\" -U 'AltPublicAgent' -O \"$file\" -N -q && printAndLog 'done\\n' 'APP' || printAndLog 'failed\\n' 'APP'\r\n if [ ! -e \"$file\" ]; then\r\n continue\r\n fi\r\n if [ -e \"$file.old\" ]; then\r\n chmod --reference=\"$file.old\" \"$file\" || printAndLog \"Failed to copy chmod to file $file\\n\" 'ERR'\r\n chmod -x \"$file.old\" || printAndLog \"Failed to remove execution permissions from file $file.old\\n\" 'ERR'\r\n else\r\n chmod +x \"$file\" || printAndLog \"Failed to add execution permissions to file $file\\n\" 'ERR'\r\n fi\r\n else\r\n printAndLog 'done\\n' 'APP'\r\n fi\r\n done\r\n validateFiles\r\n }\r\n\r\n if [ $noLogFile != true ]; then\r\n truncate -s 0 'update.log'\r\n fi\r\n if [[ ( \"$dryRun\" == false ) && ( ! -e 'update.cfg' ) ]]; then\r\n printf '{\"branch\":\"release\",\"modules\":[\"js-module\"]}' | jq '.' > 'update.cfg'\r\n fi\r\n updateCfg=$([[ -e 'update.cfg' ]] && cat 'update.cfg' || printf '{\"branch\":\"release\",\"modules\":[\"js-module\"]}' | jq '.')\r\n localBranch=$(echo \"$updateCfg\" | jq -r '.branch')\r\n [[ ! -n \"$localBranch\" || \"$localBranch\" != 'release' && \"$localBranch\" != 'rc' && \"$localBranch\" != 'dev' ]] && localBranch='release'\r\n modules=($(echo \"$updateCfg\" | jq -r '.modules \/\/ \"\"' | tr -d '[],\"'))\r\n [[ ! -n \"$modules\" ]] && modules=('js-module')\r\n fetchUpdateData\r\n localBuild=\"$(echo \"$updateCfg\" | jq -r 'if .build == null then empty else .build end')\"\r\n [[ -z $localBuild || $localBuild == \"-1\" ]] && localBuild=$remoteBuild\r\n printAndLog \"Current version: $localBuild\\n\"\r\n printAndLog \"Latest version: $remoteBuild\\n\"\r\n validateFiles\r\n downloadFiles\r\nchmod +x .\/altv-server\r\necho -e \"install complete\"", "container": "debian:buster-slim", "entrypoint": "bash" } @@ -25,7 +30,7 @@ "variables": [ { "name": "ld lib path", - "description": "Needed to load modules correctly.", + "description": "Needed to load modules correctly. Best left at default.", "env_variable": "LD_LIBRARY_PATH", "default_value": ".", "user_viewable": false, @@ -33,8 +38,8 @@ "rules": "required|string|max:20" }, { - "name": "Which alt:V build to download", - "description": "The supported versions are release, rc, dev (default: release).\r\n\r\nIf you don't know what you are doing leave it on stable", + "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, @@ -60,4 +65,4 @@ "rules": "required|string" } ] -} \ No newline at end of file +} diff --git a/minecraft/java/fabric/egg-fabric.json b/minecraft/java/fabric/egg-fabric.json index d8ebf272..15a3f878 100644 --- a/minecraft/java/fabric/egg-fabric.json +++ b/minecraft/java/fabric/egg-fabric.json @@ -3,7 +3,7 @@ "meta": { "version": "PTDL_v1" }, - "exported_at": "2020-12-06T19:54:35-08:00", + "exported_at": "2021-02-10T17:15:03-05:00", "name": "Fabric", "author": "accounts@bofanodes.io", "description": "Fabric is a modular modding toolchain targeting Minecraft 1.14 and above, including snapshots.", @@ -18,7 +18,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Fabric MC Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl jq unzip dos2unix wget\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\nif [ -z \"$FABRIC_VERSION\" ] || [ \"$FABRIC_VERSION\" == \"latest\" ]; then\r\nFABRIC_VERSION=$(curl https:\/\/maven.fabricmc.net\/net\/fabricmc\/fabric-installer\/ | grep -Po '(?<=href=\")[^\"]*' | sort -h | tail -1 | sed 's,\/,,g')\r\nwget https:\/\/maven.fabricmc.net\/net\/fabricmc\/fabric-installer\/$FABRIC_VERSION\/fabric-installer-$FABRIC_VERSION.jar\r\nelse\r\nwget https:\/\/maven.fabricmc.net\/net\/fabricmc\/fabric-installer\/$FABRIC_VERSION\/fabric-installer-$FABRIC_VERSION.jar\r\nfi\r\njava -jar fabric-installer-$FABRIC_VERSION.jar server -downloadMinecraft\r\necho -e \"Install Complete\"", + "script": "#!\/bin\/bash\r\n# Fabric MC Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl jq unzip dos2unix wget\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n# Enable snapshots\r\nif [ \"$MC_VERSION\" == \"snapshot\" ]; then\r\n MC_VERSION=$(curl -sSL https:\/\/meta.fabricmc.net\/v2\/versions\/game | jq -r '.[] | select(.stable== false )|.version' | head -n1)\r\nfi\r\nif [ -z \"$FABRIC_VERSION\" ] || [ \"$FABRIC_VERSION\" == \"latest\" ]; then\r\n FABRIC_VERSION=$(curl -sSL https:\/\/meta.fabricmc.net\/v2\/versions\/installer | jq -r '.[0].version')\r\nfi\r\nwget https:\/\/maven.fabricmc.net\/net\/fabricmc\/fabric-installer\/$FABRIC_VERSION\/fabric-installer-$FABRIC_VERSION.jar\r\njava -jar fabric-installer-$FABRIC_VERSION.jar server -mcversion ${MC_VERSION:-latest} -downloadMinecraft\r\necho -e \"Install Complete\"", "container": "openjdk:11-jdk-slim", "entrypoint": "bash" } @@ -33,6 +33,15 @@ "user_editable": true, "rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/" }, + { + "name": "Minecraft Version", + "description": "The version of Minecraft to install. Use \"latest\" to install the latest version, or use \"snapshot\" to install the latest snapshot.", + "env_variable": "MC_VERSION", + "default_value": "latest", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|between:3,15" + }, { "name": "Fabric Version", "description": "The version of Fabric to install.", diff --git a/steamcmd_servers/eco/egg-eco.json b/steamcmd_servers/eco/egg-eco.json index 4b57f7b8..c879c81c 100644 --- a/steamcmd_servers/eco/egg-eco.json +++ b/steamcmd_servers/eco/egg-eco.json @@ -3,7 +3,7 @@ "meta": { "version": "PTDL_v1" }, - "exported_at": "2020-11-30T16:56:23+01:00", + "exported_at": "2021-02-08T10:56:34-06:00", "name": "Eco", "author": "info@goover.de", "description": "Eco is an online world from Strange Loop Games where players must build civilization using resources from an ecosystem that can be damaged and destroyed. The world of Eco is an incredibly reactive one, and whatever any player does in the world affects the underlying ecosystem.", @@ -12,7 +12,7 @@ "startup": "export DOTNET_BUNDLE_EXTRACT_BASE_DIR=.\/dotnet-bundle && .\/EcoServer", "config": { "files": "{\r\n \"Configs\/Network.eco\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"GameServerPort\": \"{{server.build.default.port}}\",\r\n \"WebServerPort\": \"{{server.build.env.WEB_PORT}}\",\r\n \"PublicServer\": \"{{server.build.env.PUB_SRV}}\",\r\n \"Password\": \"{{server.build.env.SRV_PWD}}\",\r\n \"UPnPEnabled\": \"{{server.build.env.UPNP}}\",\r\n \"Description\": \"{{server.build.env.SRV_DES}}\"\r\n }\r\n }\r\n}", - "startup": "{\r\n \"done\": \"[Server Initialization]... \",\r\n \"userInteraction\": []\r\n}", + "startup": "{\r\n \"done\": \"Web Server now listening on\",\r\n \"userInteraction\": []\r\n}", "logs": "{\r\n \"custom\": true,\r\n \"location\": \"logs\/latest.log\"\r\n}", "stop": "exit" }, @@ -79,4 +79,4 @@ "rules": "required|string|max:20" } ] -} \ No newline at end of file +} diff --git a/steamcmd_servers/valheim/egg-valheim.json b/steamcmd_servers/valheim/egg-valheim.json index 979c6153..59ecf682 100644 --- a/steamcmd_servers/valheim/egg-valheim.json +++ b/steamcmd_servers/valheim/egg-valheim.json @@ -4,13 +4,13 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-02-07T19:36:46-06:00", + "exported_at": "2021-02-10T11:36:40-06:00", "name": "Valheim", "author": "magi1053@outlook.com", "description": "A brutal exploration and survival game for 1-10 players, set in a procedurally-generated purgatory inspired by viking culture.", "features": null, "image": "quay.io\/parkervcp\/pterodactyl-images:debian_source", - "startup": ".\/valheim_server.x86_64 -nographics -batchmode -name \"{{SERVER_NAME}}\" -port {{SERVER_PORT}} -world \"{{WORLD}}\" -password \"{{PASSWORD}}\" -public 1 | sed -uE \"{{FILTER}}\" & trap \"echo 1 > server_exit.drp && wait\" 15; wait $!", + "startup": ".\/valheim_server.x86_64 -nographics -batchmode -name \"{{SERVER_NAME}}\" -port {{SERVER_PORT}} -world \"{{WORLD}}\" -password \"{{PASSWORD}}\" > >(sed -uE \"{{FILTER}}\") & trap \"{{STOP}}\" 15; wait $!", "config": { "files": "{}", "startup": "{\r\n \"done\": \"DungeonDB Start\"\r\n}", @@ -32,7 +32,7 @@ "default_value": "My Server", "user_viewable": true, "user_editable": true, - "rules": "required|string|max:20" + "rules": "required|string|max:60" }, { "name": "Server Password", @@ -47,7 +47,7 @@ "name": "World Name", "description": "Name to load if switching between multiple saved worlds.", "env_variable": "WORLD", - "default_value": "world", + "default_value": "Dedicated", "user_viewable": true, "user_editable": true, "rules": "required|string|max:20" @@ -78,6 +78,15 @@ "user_viewable": false, "user_editable": false, "rules": "string" + }, + { + "name": "Shutdown Command", + "description": "Commands to trigger a server shutdown.", + "env_variable": "STOP", + "default_value": "kill -2 $!; wait;", + "user_viewable": false, + "user_editable": false, + "rules": "required|string" } ] }