mirror of
https://github.com/parkervcp/eggs.git
synced 2024-11-23 04:52:52 +08:00
remove fivem comment + add finished echo
This commit is contained in:
parent
30f6a092a9
commit
db9d396ffd
@ -4,7 +4,7 @@
|
|||||||
"version": "PTDL_v2",
|
"version": "PTDL_v2",
|
||||||
"update_url": null
|
"update_url": null
|
||||||
},
|
},
|
||||||
"exported_at": "2023-01-14T11:57:46+01:00",
|
"exported_at": "2023-01-14T12:02:56+01:00",
|
||||||
"name": "FiveM",
|
"name": "FiveM",
|
||||||
"author": "parker@parkervcp.com",
|
"author": "parker@parkervcp.com",
|
||||||
"description": "A new FiveM egg for the latest builds due to recent changes in FiveM",
|
"description": "A new FiveM egg for the latest builds due to recent changes in FiveM",
|
||||||
@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"installation": {
|
"installation": {
|
||||||
"script": "#!\/bin\/bash\r\n# FiveM Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update -y\r\napt install -y tar xz-utils file jq\r\n\r\nmkdir -p \/mnt\/server\/resources\r\n\r\ncd \/mnt\/server\r\n\r\necho \"updating citizenfx resource files\"\r\ngit clone https:\/\/github.com\/citizenfx\/cfx-server-data.git \/tmp\r\ncp -Rf \/tmp\/resources\/* resources\/\r\n\r\n\r\nRELEASE_PAGE=$(curl -sSL https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master\/)\r\n\r\n\r\nif [[ \"${FIVEM_VERSION}\" == \"recommended\" ]] || [[ -z ${FIVEM_VERSION} ]]; then\r\n TEMP_LINK=$(echo $RELEASE_PAGE | grep -B 1 -i recommended | grep -o '<a href= \".*\">' | grep -Eo \"\/[a-zA-Z0-9.\/?=_%:-]*\" | head -1)\r\n DOWNLOAD_URL=$(echo -n \"https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master$TEMP_LINK\")\r\nelif [[ \"${FIVEM_VERSION}\" == \"latest\" ]]; then\r\n TEMP_LINK=$(echo $RELEASE_PAGE | grep -B 1 -i latest | grep -o '<a href= \".*\">' | grep -Eo \"\/[a-zA-Z0-9.\/?=_%:-]*\" | head -1)\r\n DOWNLOAD_URL=$(echo -n \"https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master$TEMP_LINK\")\r\nelse\r\n VERSION_LINK=$(echo $RELEASE_PAGE | grep -i ${FIVEM_VERSION} | grep -o 'href=\".*\"' | grep -Eo \"\/[a-zA-Z0-9.\/?=_%:-]*\" | head -1)\r\n if [[ \"${VERSION_LINK}\" == \"\" ]]; then\r\n echo -e \"defaulting to recommedned as the version requested was invalid.\"\r\n TEMP_LINK=$(echo $RELEASE_PAGE | grep -B 1 -i recommended | grep -o '<a href= \".*\">' | grep -Eo \"\/[a-zA-Z0-9.\/?=_%:-]*\" | head -1)\r\n DOWNLOAD_URL=$(echo -n \"https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master$TEMP_LINK\")\r\n else\r\n DOWNLOAD_LINK=$(echo https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master\/${VERSION_LINK})\r\n fi\r\nfi\r\n\r\n# check if url is valid\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 DOWNLOAD_LINK=${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\n\r\necho -e \"Running curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}\"\r\n\r\ncurl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}\r\n\r\necho \"Extracting fivem files\"\r\n\r\n## Unpacking the download\r\nFILETYPE=$(file -F ',' ${DOWNLOAD_LINK##*\/} | cut -d',' -f2 | cut -d' ' -f2)\r\nif [ \"$FILETYPE\" == \"gzip\" ]; then\r\n tar xzvf ${DOWNLOAD_LINK##*\/}\r\nelif [ \"$FILETYPE\" == \"Zip\" ]; then\r\n unzip ${DOWNLOAD_LINK##*\/}\r\nelif [ \"$FILETYPE\" == \"XZ\" ]; then\r\n tar xvf ${DOWNLOAD_LINK##*\/}\r\nelse\r\n echo -e \"unknown filetype. Exiting\"\r\n exit 2\r\nfi\r\n\r\n## removing the compresed file and run.sh\r\nrm -rf ${DOWNLOAD_LINK##*\/} run.sh\r\n\r\nif [ -e server.cfg ]; then\r\n echo \"Skipping downloading default server config file as one already exists\"\r\nelse\r\n echo \"Downloading default fivem config\"\r\n curl https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/gta\/fivem\/server.cfg >>server.cfg\r\nfi\r\n\r\nmkdir -p logs\/\r\n\r\necho \"install complete\"",
|
"script": "#!\/bin\/bash\r\n# FiveM Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update -y\r\napt install -y tar xz-utils file jq\r\n\r\nmkdir -p \/mnt\/server\/resources\r\n\r\ncd \/mnt\/server\r\n\r\necho \"updating citizenfx resource files\"\r\ngit clone https:\/\/github.com\/citizenfx\/cfx-server-data.git \/tmp\r\ncp -Rf \/tmp\/resources\/* resources\/\r\n\r\n\r\nRELEASE_PAGE=$(curl -sSL https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master\/)\r\n\r\nif [[ \"${FIVEM_VERSION}\" == \"recommended\" ]] || [[ -z ${FIVEM_VERSION} ]]; then\r\n TEMP_LINK=$(echo $RELEASE_PAGE | grep -B 1 -i recommended | grep -o '<a href= \".*\">' | grep -Eo \"\/[a-zA-Z0-9.\/?=_%:-]*\" | head -1)\r\n DOWNLOAD_URL=$(echo -n \"https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master$TEMP_LINK\")\r\nelif [[ \"${FIVEM_VERSION}\" == \"latest\" ]]; then\r\n TEMP_LINK=$(echo $RELEASE_PAGE | grep -B 1 -i latest | grep -o '<a href= \".*\">' | grep -Eo \"\/[a-zA-Z0-9.\/?=_%:-]*\" | head -1)\r\n DOWNLOAD_URL=$(echo -n \"https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master$TEMP_LINK\")\r\nelse\r\n VERSION_LINK=$(echo $RELEASE_PAGE | grep -i ${FIVEM_VERSION} | grep -o 'href=\".*\"' | grep -Eo \"\/[a-zA-Z0-9.\/?=_%:-]*\" | head -1)\r\n if [[ \"${VERSION_LINK}\" == \"\" ]]; then\r\n echo -e \"defaulting to recommedned as the version requested was invalid.\"\r\n TEMP_LINK=$(echo $RELEASE_PAGE | grep -B 1 -i recommended | grep -o '<a href= \".*\">' | grep -Eo \"\/[a-zA-Z0-9.\/?=_%:-]*\" | head -1)\r\n DOWNLOAD_URL=$(echo -n \"https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master$TEMP_LINK\")\r\n else\r\n DOWNLOAD_LINK=$(echo https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master\/${VERSION_LINK})\r\n fi\r\nfi\r\n\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 DOWNLOAD_LINK=${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\necho -e \"Running curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}\"\r\n\r\ncurl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}\r\n\r\necho \"Extracting fivem files\"\r\n\r\n\r\nFILETYPE=$(file -F ',' ${DOWNLOAD_LINK##*\/} | cut -d',' -f2 | cut -d' ' -f2)\r\nif [ \"$FILETYPE\" == \"gzip\" ]; then\r\n tar xzvf ${DOWNLOAD_LINK##*\/}\r\nelif [ \"$FILETYPE\" == \"Zip\" ]; then\r\n unzip ${DOWNLOAD_LINK##*\/}\r\nelif [ \"$FILETYPE\" == \"XZ\" ]; then\r\n tar xvf ${DOWNLOAD_LINK##*\/}\r\nelse\r\n echo -e \"unknown filetype. Exiting\"\r\n exit 2\r\nfi\r\n\r\n## removing the compresed file and run.sh\r\nrm -rf ${DOWNLOAD_LINK##*\/} run.sh\r\n\r\nif [ -e server.cfg ]; then\r\n echo \"Skipping downloading default server config file as one already exists\"\r\nelse\r\n echo \"Downloading default fivem config\"\r\n curl https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/gta\/fivem\/server.cfg >>server.cfg\r\nfi\r\n\r\nmkdir -p logs\/\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"",
|
||||||
"container": "ghcr.io\/parkervcp\/installers:debian",
|
"container": "ghcr.io\/parkervcp\/installers:debian",
|
||||||
"entrypoint": "bash"
|
"entrypoint": "bash"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user