-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathegg-greg-tech-new-horizons.json
More file actions
92 lines (92 loc) · 5.42 KB
/
Copy pathegg-greg-tech-new-horizons.json
File metadata and controls
92 lines (92 loc) · 5.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL",
"meta": {
"version": "PLCN_v3",
"update_url": null
},
"exported_at": "2025-05-24T04:00:00+02:00",
"name": "GregTech:New Horizons",
"author": "DJSchaffner@outlook.com",
"uuid": "499bdc18-3ee6-4bc1-8e1f-00d65b8df931",
"description": "Minecraft GregTech:New Horizons Server",
"image": null,
"tags": [],
"features": [
"eula",
"java_version",
"pid_limit"
],
"docker_images": {
"Java 21": "ghcr.io\/pterodactyl\/yolks:java_21"
},
"file_denylist": [],
"startup_commands": {
"Default": "java -XX:InitialRAMPercentage=95.0 -XX:MaxRAMPercentage=95.0 -Dfml.readTimeout=180 @java9args.txt -jar lwjgl3ify-forgePatches.jar nogui"
},
"config": {
"files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"server-port\": \"{{server.allocations.default.port}}\",\r\n \"query.port\": \"{{server.allocations.default.port}}\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \")! For help, type \"\r\n}",
"logs": "{}",
"stop": "stop"
},
"scripts": {
"installation": {
"script": "#!\/bin\/ash\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit 1\r\n\r\nGTNH_VERSION=\"${GTNH_VERSION\/\/ \/}\"\r\nAVAILABLE_VERSIONS=$(curl -s https:\/\/downloads.gtnewhorizons.com\/ServerPacks\/?raw)\r\nFILTERED_VERSIONS=$(echo -e \"$AVAILABLE_VERSIONS\" | grep -v -e 'Java_8.zip' | grep $([[ ${IS_BETA_VERSION:-0} -ne 1 ]] && echo \"-v \") -e '\/betas\/')\r\n\r\nif [[ \"$GTNH_VERSION\" != \"latest\" ]]; then\r\n echo -e \"Constructing download link for specified version $GTNH_VERSION\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | grep -e _\"$GTNH_VERSION\"_)\"\r\nelse\r\n echo -e \"No version specified. Getting latest available version\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | tail -n 1)\"\r\nfi\r\n\r\necho -e \"Download link: $DOWNLOAD_LINK\"\r\nZIP_FILE=GTNH_${GTNH_VERSION}.zip\r\n\r\nif curl --output \/dev\/null --silent --head --fail \"$DOWNLOAD_LINK\"; then\r\n echo -e \"Download link is valid\"\r\nelse\r\n echo -e \"Invalid download link - Check provided GT:NH version. Exiting now!\"\r\n exit 1\r\nfi\r\n\r\necho -e \"Backing up [${KEEP_ON_INSTALL}]\"\r\nmkdir tmpBackup\r\ncp -rafv --parents ${KEEP_ON_INSTALL} -t tmpBackup | sed 's\/^\/\\t\/'\r\n\r\necho -e \"Removing files from previous installation; [${DELETE_ON_INSTALL}]\"\r\necho -e \"Only printing directories until depth of 1, and top level files.\"\r\nrm -rfv ${DELETE_ON_INSTALL} | grep -E \"directory[^\/]+\\\/[^\/]*$|^[^\/]+$\" | sed 's\/^\/\\t\/'\r\n\r\necho -e \"Downloading archive\"\r\ncurl -o \"$ZIP_FILE\" \"$DOWNLOAD_LINK\"\r\n\r\necho -e \"Start extracting archive\"\r\ntimeout 60s unzip -nq \"$ZIP_FILE\"\r\nif [ $? -ge 124 ]; then\r\n echo \"Extraction was unsuccessful or timed out!\"\r\n exit 1\r\nfi\r\n\r\necho -e \"Restoring backed up files\"\r\ncp -rafv -t .\/ tmpBackup\/* | sed 's\/^\/\\t\/'\r\nrm -rfv tmpBackup | sed 's\/^\/\\t\/'\r\n\r\nchmod +x lwjgl3ify-forgePatches.jar\r\nchmod +x forge-*.jar\r\n\r\necho -e \"Deleting zip file\"\r\nrm -f \"$ZIP_FILE\"\r\nrm -rf \"$CONFIG_DIR_BACKUP\"\r\n\r\necho -e \"Installation process is completed\"",
"container": "ghcr.io\/pterodactyl\/installers:alpine",
"entrypoint": "ash"
}
},
"variables": [
{
"name": "GT:NH Version",
"description": "The version of GregTech:New Horizons to use. Set to \"latest\" for latest version, or specify a version number.\r\nExample: 2.7.0",
"env_variable": "GTNH_VERSION",
"default_value": "latest",
"user_viewable": true,
"user_editable": true,
"rules": [
"required",
"string",
"max:20"
],
"sort": 1
},
{
"name": "Use Beta Version",
"description": "Enable if you want to use a beta version",
"env_variable": "IS_BETA_VERSION",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": [
"required",
"boolean"
],
"sort": 2
},
{
"name": "Delete During Install \/ Reinstall",
"description": "These files will be deleted during install \/ reinstall",
"env_variable": "DELETE_ON_INSTALL",
"default_value": "config libraries mods resources scripts lwjgl3ify-forgePatches.jar java9args.txt startserver-java9.bat startserver-java9.sh",
"user_viewable": true,
"user_editable": true,
"rules": [
"string"
],
"sort": 3
},
{
"name": "Keep During Install \/ Reinstall",
"description": "Use this to prevent the script from deleting them during install \/ reinstall. Useful to retain items inside folders which are deleted\r\nExample: config\/JourneyMapServer",
"env_variable": "KEEP_ON_INSTALL",
"default_value": "config\/JourneyMapServer",
"user_viewable": true,
"user_editable": true,
"rules": [
"string"
],
"sort": 4
}
]
}