update factorio egg

Fix for newer releases.
This commit is contained in:
Michael (Parker) Parker 2019-05-13 14:22:16 -04:00 committed by Michael Parker
parent 0d1007b0de
commit 9a08524ab4

View File

@ -3,7 +3,7 @@
"meta": {
"version": "PTDL_v1"
},
"exported_at": "2019-08-18T21:02:25+02:00",
"exported_at": "2019-05-13T14:18:20-04:00",
"name": "Factorio",
"author": "parker@parkervcp.com",
"description": "The vanilla Factorio server.\r\n\r\nhttps:\/\/www.factorio.com\/",
@ -17,7 +17,7 @@
},
"scripts": {
"installation": {
"script": "#!\/bin\/ash\r\n# Factorio Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napk add --no-cache curl tar xz jq\r\n\r\nlatest_stable=`curl -sL https:\/\/updater.factorio.com\/get-available-versions | jq -r '.[\"core-linux_headless64\"] | .[] | .[\"stable\"] | select(. != null)'`\r\nlatest_experimental=`curl -sL https:\/\/www.factorio.com\/download-headless\/experimental | grep -m 1 -o -E '([0-9]\\.[0-9]*\\.[0-9]*)'`\r\n\r\nif [ -z \"${FACTORIO_VERSION}\" ] || [ \"${FACTORIO_VERSION}\" == \"latest\" ]; then\r\n DL_VERSION=$latest_stable\r\nelif [ \"${FACTORIO_VERSION}\" == \"experimental\" ]; then\r\n DL_VERSION=$latest_experimental\r\nelse\r\n DL_VERSION=${FACTORIO_VERSION}\r\nfi\r\n\r\necho -e \"\\n running 'curl -sL https:\/\/www.factorio.com\/get-download\/${DL_VERSION}\/headless\/linux64 -o factorio-${DL_VERSION}.tar.gz' \\n\"\r\n\r\ncd \/mnt\/server\r\n\r\ncurl -sL https:\/\/www.factorio.com\/get-download\/${DL_VERSION}\/headless\/linux64 -o factorio-${DL_VERSION}.tar.gz\r\n\r\ntar -xf factorio-${DL_VERSION}.tar.gz --strip-components=1 -C \/mnt\/server\r\n\r\nrm factorio-${DL_VERSION}.tar.gz\r\n\r\nif [ -e data\/map-gen-settings.json ]; then\r\n echo \"map-gen exists\"\r\nelse\r\n echo \"copying map-gen default settings\"\r\n mv data\/map-gen-settings.example.json data\/map-gen-settings.json\r\nfi\r\n\r\nif [ -e data\/server-settings.json ]; then\r\n echo \"server settings exists\"\r\nelse\r\n echo \"copying server default settings\"\r\n mv data\/server-settings.example.json data\/server-settings.json\r\nfi\r\n\r\nif [ -e map-settings.json ]; then\r\n echo \"map settings exists\"\r\nelse\r\n echo \"copying map default settings\"\r\n mv data\/map-settings.example.json data\/map-settings.json\r\nfi\r\n\r\nif [ -e ${SAVE_NAME}.zip ]; then\r\n echo \"save file exists\"\r\nelse\r\n .\/bin\/x64\/factorio --create ${SAVE_NAME}\r\n chmod o+w ${SAVE_NAME}.zip\r\nfi",
"script": "#!\/bin\/ash\r\n# Factorio Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napk add --no-cache --update curl tar xz jq\r\n\r\nlatest_stable=`curl -sL https:\/\/updater.factorio.com\/get-available-versions | jq -r '.[\"core-linux_headless64\"] | .[] | .[\"stable\"] | select(. != null)'`\r\nlatest_experimental=`curl -sL https:\/\/www.factorio.com\/download-headless\/experimental | grep -m 1 -o -E '([0-9]\\.[0-9]*\\.[0-9]*)'`\r\n\r\nif [ -z \"${FACTORIO_VERSION}\" ] || [ \"${FACTORIO_VERSION}\" == \"latest\" ]; then\r\n DL_VERSION=$latest_stable\r\nelif [ \"${FACTORIO_VERSION}\" == \"experimental\" ]; then\r\n DL_VERSION=$latest_experimental\r\nelse\r\n DL_VERSION=${FACTORIO_VERSION}\r\nfi\r\n\r\necho -e \"\\n running 'curl -sL https:\/\/www.factorio.com\/get-download\/${DL_VERSION}\/headless\/linux64 -o factorio-${DL_VERSION}' \\n\"\r\n\r\ncd \/mnt\/server\r\n\r\ncurl -sL https:\/\/www.factorio.com\/get-download\/${DL_VERSION}\/headless\/linux64 -o factorio-${DL_VERSION}\r\n\r\ntar -xf factorio-${DL_VERSION} --strip-components=1 -C \/mnt\/server\r\n\r\nrm factorio-${DL_VERSION}\r\n\r\nif [ -e data\/map-gen-settings.json ]; then\r\n echo \"map-gen exists\"\r\nelse\r\n echo \"copying map-gen default settings\"\r\n mv data\/map-gen-settings.example.json data\/map-gen-settings.json\r\nfi\r\n\r\nif [ -e data\/server-settings.json ]; then\r\n echo \"server settings exists\"\r\nelse\r\n echo \"copying server default settings\"\r\n mv data\/server-settings.example.json data\/server-settings.json\r\nfi\r\n\r\nif [ -e map-settings.json ]; then\r\n echo \"map settings exists\"\r\nelse\r\n echo \"copying map default settings\"\r\n mv data\/map-settings.example.json data\/map-settings.json\r\nfi\r\n\r\nif [ -e ${SAVE_NAME}.zip ]; then\r\n echo \"save file exists\"\r\nelse\r\n .\/bin\/x64\/factorio --create ${SAVE_NAME}\r\n chmod o+w ${SAVE_NAME}.zip\r\nfi",
"container": "frolvlad\/alpine-glibc",
"entrypoint": "ash"
}
@ -114,4 +114,4 @@
"rules": "required|numeric|digits_between:1,3"
}
]
}
}