mirror of
https://github.com/pelican-eggs/games-standalone.git
synced 2024-11-23 02:42:30 +01:00
Implement suggested fixes
This commit is contained in:
parent
027eff735a
commit
e26fc57b98
@ -4,7 +4,7 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2023-02-28T14:35:03-05:00",
|
||||
"exported_at": "2023-03-05T13:37:42-05:00",
|
||||
"name": "FTB-modpacks.ch Server",
|
||||
"author": "runemaster580@gmail.com",
|
||||
"description": "Since the release of the FTB APP, FTB modpacks are now distributed through modpacks.ch. This egg was developed for support for modpacks that are distributed through this.",
|
||||
@ -29,7 +29,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"installation": {
|
||||
"script": "#!\/bin\/bash\r\n# FTB Pack Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n# Download needed software.\r\napt update\r\napt install -y curl jq\r\n\r\n\r\n# if no modpack id is set and modpack search term is set.\r\nif [ -z ${FTB_MODPACK_ID} ] && [ ! -z ${FTB_SEARCH_TERM} ]; then\r\n JSON_DATA=$(curl -sSL https:\/\/api.modpacks.ch\/public\/modpack\/search\/8?term=${FTB_SEARCH_TERM})\r\n\r\n # grabs the first modpack in array.\r\n FTB_MODPACK_ID=$(echo -e ${JSON_DATA} | jq -r \".packs[]\")\r\nfi\r\n\r\nif [ -z ${FTB_MODPACK_VERSION_ID} ] && [ ! -z ${FTB_VERSION_STRING} ]; then\r\n # grabs the correct version id matching the string.\r\n FTB_MODPACK_VERSION_ID=$(curl -sSL https:\/\/api.modpacks.ch\/public\/modpack\/${FTB_MODPACK_ID} | jq -r --arg VSTRING ${FTB_VERSION_STRING} '.versions[] | select(.name == $VSTRING) | .id')\r\nfi\r\n\r\n# get architecture for installer\r\nINSTALLER_TYPE=$([ \"$(uname -m)\" == \"x86_64\" ] && echo \"linux\" || echo \"arm\/linux\")\r\n\r\necho \"ModpackID: ${FTB_MODPACK_ID} VersionID: ${FTB_MODPACK_VERSION_ID} InstallerType: ${INSTALLER_TYPE}\"\r\n\r\n# download installer\r\ncurl -L https:\/\/api.modpacks.ch\/public\/modpack\/0\/0\/server\/${INSTALLER_TYPE} --output serversetup\r\nchmod +x .\/serversetup\r\n\r\n\r\n# remove old forge files (to allow updating)\r\nrm -rf libraries\/net\/minecraftforge\/forge\r\nrm -f unix_args.txt\r\n\r\n# run installer\r\n.\/serversetup ${FTB_MODPACK_ID} ${FTB_MODPACK_VERSION_ID} --auto --noscript --nojava\r\n\r\n# create symlink for forge unix_args.txt if exists\r\nif compgen -G \"libraries\/net\/minecraftforge\/forge\/*\/unix_args.txt\"; then\r\n ln -sf libraries\/net\/minecraftforge\/forge\/*\/unix_args.txt unix_args.txt\r\nfi\r\n\r\n# move forge\/fabric jar file to start-server.jar if exists\r\nif compgen -G \"forge-*.jar\"; then\r\n mv -f forge-*.jar start-server.jar\r\nelif compgen -G \"fabric-*.jar\"; then\r\n mv -f fabric-*.jar start-server.jar\r\nfi\r\n\r\n# installer cleanup\r\nrm serversetup\r\nrm -f run.bat\r\nrm -f run.sh\r\n\r\necho \"Finished installing FTB modpack\"",
|
||||
"script": "#!\/bin\/bash\r\n# FTB Pack Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\nif [ ! -d \/mnt\/server ]; then\r\n mkdir -p \/mnt\/server\r\nfi\r\ncd \/mnt\/server\r\n\r\n\r\n# Download needed software.\r\nfunction install_required {\r\n apt update\r\n apt install -y curl jq\r\n}\r\n\r\nfunction get_modpack_id {\r\n # if no modpack id is set and modpack search term is set.\r\n if [ -z ${FTB_MODPACK_ID} ] && [ ! -z ${FTB_SEARCH_TERM} ]; then\r\n JSON_DATA=$(curl -sSL https:\/\/api.modpacks.ch\/public\/modpack\/search\/8?term=${FTB_SEARCH_TERM})\r\n \r\n # grabs the first modpack in array.\r\n FTB_MODPACK_ID=$(echo -e ${JSON_DATA} | jq -r \".packs[]\")\r\n fi\r\n \r\n if [ -z ${FTB_MODPACK_VERSION_ID} ] && [ ! -z ${FTB_VERSION_STRING} ]; then\r\n # grabs the correct version id matching the string.\r\n FTB_MODPACK_VERSION_ID=$(curl -sSL https:\/\/api.modpacks.ch\/public\/modpack\/${FTB_MODPACK_ID} | jq -r --arg VSTRING ${FTB_VERSION_STRING} '.versions[] | select(.name == $VSTRING) | .id')\r\n fi\r\n}\r\n\r\nfunction run_installer {\r\n # get architecture for installer\r\n INSTALLER_TYPE=$([ \"$(uname -m)\" == \"x86_64\" ] && echo \"linux\" || echo \"arm\/linux\")\r\n echo \"ModpackID: ${FTB_MODPACK_ID} VersionID: ${FTB_MODPACK_VERSION_ID} InstallerType: ${INSTALLER_TYPE}\"\r\n\r\n # download installer\r\n curl -L https:\/\/api.modpacks.ch\/public\/modpack\/0\/0\/server\/${INSTALLER_TYPE} --output serversetup\r\n chmod +x .\/serversetup\r\n \r\n # remove old forge files (to allow updating)\r\n rm -rf libraries\/net\/minecraftforge\/forge\r\n rm -f unix_args.txt\r\n \r\n # run installer\r\n .\/serversetup ${FTB_MODPACK_ID} ${FTB_MODPACK_VERSION_ID} --auto --noscript --nojava\r\n}\r\n\r\n# allows startup command to work\r\nfunction move_startup_files {\r\n # create symlink for forge unix_args.txt if exists\r\n if compgen -G \"libraries\/net\/minecraftforge\/forge\/*\/unix_args.txt\"; then\r\n ln -sf libraries\/net\/minecraftforge\/forge\/*\/unix_args.txt unix_args.txt\r\n fi\r\n \r\n # move forge\/fabric jar file to start-server.jar if exists\r\n if compgen -G \"forge-*.jar\"; then\r\n mv -f forge-*.jar start-server.jar\r\n elif compgen -G \"fabric-*.jar\"; then\r\n mv -f fabric-*.jar start-server.jar\r\n fi\r\n}\r\n\r\n# installer cleanup\r\nfunction installer_cleanup {\r\n rm serversetup\r\n rm -f run.bat\r\n rm -f run.sh\r\n}\r\n\r\n# run installation steps\r\ninstall_required\r\nget_modpack_id\r\nrun_installer\r\nmove_startup_files\r\ninstaller_cleanup\r\n\r\necho \"Finished installing FTB modpack\"",
|
||||
"container": "openjdk:8-jdk-slim",
|
||||
"entrypoint": "bash"
|
||||
}
|
||||
@ -42,7 +42,7 @@
|
||||
"default_value": "",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|string|max:99|min:4",
|
||||
"rules": "nullable|string",
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -52,7 +52,7 @@
|
||||
"default_value": "",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|integer|min:1",
|
||||
"rules": "nullable|integer",
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -62,7 +62,7 @@
|
||||
"default_value": "",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|string|max:20",
|
||||
"rules": "nullable|string",
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -72,7 +72,7 @@
|
||||
"default_value": "",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|integer|min:1",
|
||||
"rules": "nullable|integer",
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user