pelican-eggs / eggs

Service eggs for the pterodactyl panel
MIT License
2.81k stars 2.32k forks source link

Proposed changes for the FiveM install Script #1205

Closed Blumlaut closed 3 years ago

Blumlaut commented 3 years ago

Panel Version: Not Applicable Daemon Version: Not Applicable Service: FiveM Modified: Not Applicable

As i don't want to mess with the "minified" FiveM install script in the egg-five-m.sjon and create a PR from that, i want to propose a few small changes to make it more reliable.

First off, i would very much consider changing the "latest version" installer to using the FiveM API at https://changelogs-live.fivem.net/api/changelog/versions/linux/server instead of scraping the Versions Page, since the normal page can/will change.

Since FiveM has a policy which "forbids" using outdated Server Versions, using recommended artifacts is not something i would recommend, instead the latest should probably be used, here is a working example that can be used in the installer, jq is required to parse json.

if [ "${FIVEM_VERSION}" == "latest" ] || [ -z ${FIVEM_VERSION} ] ; then
    RELEASE_PAGE=$(curl -sSL https://changelogs-live.fivem.net/api/changelog/versions/linux/server)
    DOWNLOAD_LINK=$(echo $RELEASE_PAGE | jq -r '.latest_download')
else

Also, before installing the version, the alpine folder should be deleted, as overwriting these files can/will break things, so adding rm -rf alpine somewhere before the extraction should already be enough.

Let me know if you have any questions or concerns, i would create a PR; but i'm afraid my changes would not be clearly visible, and i'm personally not sure i can "minify" it exactly like ptero requires it, as i personally don't use the software i could not guarantee it flawlessly working

Greetings.

gOOvER commented 3 years ago

i would create a PR, so it's easier to see whats going on :)

Blumlaut commented 3 years ago

i would create a PR, so it's easier to see whats going on :)

As i personally don't have an environment for it set up and i'm not sure how exactly it's been minified, sadly i cant do that right now, if you can tell me how to minify and unminify it quickly then i'll gladly do so.

Software-Noob commented 3 years ago

The egg will not be updated to work around fetching latest versions per request of the developers to stop hosts until a common agreement is found.

Otherwise, they will stop releasing Linux builds.

Blumlaut commented 3 years ago

The egg will not be updated to work around fetching latest versions per request of the developers to stop hosts until a common agreement is found.

Otherwise, they will stop releasing Linux builds.

Sorry, I dont personally follow the FiveM Community or pterodactyl actively so i didnt know there were any issues with it, i will close this issue then if it's not wanted.

Cheers