Added server password option to egg-factorio.json (#29)

* Added server password option egg-factorio.json

Added the option to set a password to the server in the panel.

* add changes to ptero egg and arm64 egg

---------

Co-authored-by: QuintenQVD0 <josdekurk@gmail.com>
This commit is contained in:
Raeniri 2024-09-08 20:00:21 +02:00 committed by GitHub
parent 32825fbb51
commit 4a90f1e145
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 84 additions and 42 deletions

View File

@ -4,7 +4,7 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2024-06-01T00:17:39+00:00",
"exported_at": "2024-09-08T19:58:10+02:00",
"name": "Factorio ARM64",
"author": "parker@parkervcp.com",
"uuid": "a96b46b4-9f42-4a0a-8881-0bd9c4cbf079",
@ -16,7 +16,7 @@
"file_denylist": [],
"startup": "if [ ! -f \".\/saves\/{{SAVE_NAME}}.zip\" ]; then box64 .\/bin\/x64\/factorio --create .\/saves\/{{SAVE_NAME}}.zip --map-gen-settings data\/map-gen-settings.json --map-settings data\/map-settings.json; fi;\r\nbox64 .\/bin\/x64\/factorio --port {{SERVER_PORT}} --server-settings data\/server-settings.json --start-server saves\/{{SAVE_NAME}}.zip",
"config": {
"files": "{\r\n \"data\/server-settings.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"name\": \"{{server.build.env.SERVER_NAME}}\",\r\n \"description\": \"{{server.build.env.SERVER_DESC}}\",\r\n \"max_players\": \"{{server.build.env.MAX_SLOTS}}\",\r\n \"username\": \"{{server.build.env.SERVER_USERNAME}}\",\r\n \"token\": \"{{server.build.env.SERVER_TOKEN}}\",\r\n \"autosave_interval\": \"{{server.build.env.SAVE_INTERVAL}}\",\r\n \"autosave_slots\": \"{{server.build.env.SAVE_SLOTS}}\",\r\n \"afk_autokick_interval\": \"{{server.build.env.AFK_KICK}}\"\r\n }\r\n }\r\n}",
"files": "{\n \"data\/server-settings.json\": {\n \"parser\": \"json\",\n \"find\": {\n \"name\": \"{{server.environment.SERVER_NAME}}\",\n \"description\": \"{{server.environment.SERVER_DESC}}\",\n \"max_players\": \"{{server.environment.MAX_SLOTS}}\",\n \"username\": \"{{server.environment.SERVER_USERNAME}}\",\n \"token\": \"{{server.environment.SERVER_TOKEN}}\",\n \"autosave_interval\": \"{{server.environment.SAVE_INTERVAL}}\",\n \"autosave_slots\": \"{{server.environment.SAVE_SLOTS}}\",\n \"afk_autokick_interval\": \"{{server.environment.AFK_KICK}}\",\n \"game_password\": \"{{server.environment.SERVER_PASSWORD}}\"\n }\n }\n}",
"startup": "{\r\n \"done\": \"Hosting game at\"\r\n}",
"logs": "{}",
"stop": "\/quit"
@ -139,6 +139,17 @@
"sort": null,
"field_type": "text"
},
{
"name": "Server password",
"description": "The password for the server.",
"env_variable": "SERVER_PASSWORD",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "max:40",
"sort": null,
"field_type": "text"
},
{
"name": "BOX64_DYNAREC_SAFEFLAGS",
"description": "",

View File

@ -4,19 +4,19 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2024-06-01T00:17:37+00:00",
"exported_at": "2024-09-08T19:58:10+02:00",
"name": "Factorio",
"author": "parker@parkervcp.com",
"uuid": "053b2768-bae0-44ab-a82c-15245b1478e0",
"description": "The vanilla Factorio server.\r\n\r\nhttps:\/\/www.factorio.com\/",
"features": null,
"features": [],
"docker_images": {
"ghcr.io\/parkervcp\/yolks:debian": "ghcr.io\/parkervcp\/yolks:debian"
},
"file_denylist": [],
"startup": "if [ ! -f \".\/saves\/{{SAVE_NAME}}.zip\" ]; then .\/bin\/x64\/factorio --create .\/saves\/{{SAVE_NAME}}.zip --map-gen-settings data\/map-gen-settings.json --map-settings data\/map-settings.json; fi; .\/bin\/x64\/factorio --port {{SERVER_PORT}} --server-settings data\/server-settings.json --start-server saves\/{{SAVE_NAME}}.zip",
"config": {
"files": "{\r\n \"data\/server-settings.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"name\": \"{{server.build.env.SERVER_NAME}}\",\r\n \"description\": \"{{server.build.env.SERVER_DESC}}\",\r\n \"max_players\": \"{{server.build.env.MAX_SLOTS}}\",\r\n \"username\": \"{{server.build.env.SERVER_USERNAME}}\",\r\n \"token\": \"{{server.build.env.SERVER_TOKEN}}\",\r\n \"autosave_interval\": \"{{server.build.env.SAVE_INTERVAL}}\",\r\n \"autosave_slots\": \"{{server.build.env.SAVE_SLOTS}}\",\r\n \"afk_autokick_interval\": \"{{server.build.env.AFK_KICK}}\"\r\n }\r\n }\r\n}",
"files": "{\n \"data\/server-settings.json\": {\n \"parser\": \"json\",\n \"find\": {\n \"name\": \"{{server.environment.SERVER_NAME}}\",\n \"description\": \"{{server.environment.SERVER_DESC}}\",\n \"max_players\": \"{{server.environment.MAX_SLOTS}}\",\n \"username\": \"{{server.environment.SERVER_USERNAME}}\",\n \"token\": \"{{server.environment.SERVER_TOKEN}}\",\n \"autosave_interval\": \"{{server.environment.SAVE_INTERVAL}}\",\n \"autosave_slots\": \"{{server.environment.SAVE_SLOTS}}\",\n \"afk_autokick_interval\": \"{{server.environment.AFK_KICK}}\",\n \"game_password\": \"{{server.environment.SERVER_PASSWORD}}\"\n }\n }\n}",
"startup": "{\r\n \"done\": \"Hosting game at\"\r\n}",
"logs": "{}",
"stop": "\/quit"
@ -37,7 +37,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|string|between:3,12",
"sort": null,
"sort": 1,
"field_type": "text"
},
{
@ -48,7 +48,7 @@
"user_viewable": true,
"user_editable": false,
"rules": "required|numeric|digits_between:1,3",
"sort": null,
"sort": 2,
"field_type": "text"
},
{
@ -59,7 +59,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "alpha_dash|between:1,100",
"sort": null,
"sort": 3,
"field_type": "text"
},
{
@ -70,7 +70,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "alpha_num|max:100",
"sort": null,
"sort": 4,
"field_type": "text"
},
{
@ -81,7 +81,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:100",
"sort": null,
"sort": 5,
"field_type": "text"
},
{
@ -92,7 +92,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:200",
"sort": null,
"sort": 6,
"field_type": "text"
},
{
@ -103,7 +103,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:40",
"sort": null,
"sort": 7,
"field_type": "text"
},
{
@ -114,7 +114,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|numeric|digits_between:1,3",
"sort": null,
"sort": 8,
"field_type": "text"
},
{
@ -125,7 +125,7 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|numeric|digits_between:1,3",
"sort": null,
"sort": 9,
"field_type": "text"
},
{
@ -136,8 +136,19 @@
"user_viewable": true,
"user_editable": true,
"rules": "required|numeric|digits_between:1,3",
"sort": null,
"sort": 10,
"field_type": "text"
},
{
"name": "Server password",
"description": "The password for the server.",
"env_variable": "SERVER_PASSWORD",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "max:40",
"sort": 11,
"field_type": "text"
}
]
}
}

View File

@ -1,30 +1,30 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL",
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"update_url": null,
"version": "PTDL_v2"
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2024-06-01T00:17:39+00:00",
"exported_at": "2024-09-08T19:58:10+02:00",
"name": "Factorio ARM64",
"author": "parker@parkervcp.com",
"description": "The vanilla Factorio server.\r\n\r\nhttps://www.factorio.com/",
"description": "The vanilla Factorio server.\r\n\r\nhttps:\/\/www.factorio.com\/",
"features": null,
"docker_images": {
"Box64": "ghcr.io/parkervcp/yolks:box64"
"Box64": "ghcr.io\/parkervcp\/yolks:box64"
},
"file_denylist": [],
"startup": "if [ ! -f \"./saves/{{SAVE_NAME}}.zip\" ]; then box64 ./bin/x64/factorio --create ./saves/{{SAVE_NAME}}.zip --map-gen-settings data/map-gen-settings.json --map-settings data/map-settings.json; fi;\r\nbox64 ./bin/x64/factorio --port {{SERVER_PORT}} --server-settings data/server-settings.json --start-server saves/{{SAVE_NAME}}.zip",
"startup": "if [ ! -f \".\/saves\/{{SAVE_NAME}}.zip\" ]; then box64 .\/bin\/x64\/factorio --create .\/saves\/{{SAVE_NAME}}.zip --map-gen-settings data\/map-gen-settings.json --map-settings data\/map-settings.json; fi;\r\nbox64 .\/bin\/x64\/factorio --port {{SERVER_PORT}} --server-settings data\/server-settings.json --start-server saves\/{{SAVE_NAME}}.zip",
"config": {
"files": "{\r\n \"data/server-settings.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"name\": \"{{server.build.env.SERVER_NAME}}\",\r\n \"description\": \"{{server.build.env.SERVER_DESC}}\",\r\n \"max_players\": \"{{server.build.env.MAX_SLOTS}}\",\r\n \"username\": \"{{server.build.env.SERVER_USERNAME}}\",\r\n \"token\": \"{{server.build.env.SERVER_TOKEN}}\",\r\n \"autosave_interval\": \"{{server.build.env.SAVE_INTERVAL}}\",\r\n \"autosave_slots\": \"{{server.build.env.SAVE_SLOTS}}\",\r\n \"afk_autokick_interval\": \"{{server.build.env.AFK_KICK}}\"\r\n }\r\n }\r\n}",
"logs": "{}",
"files": "{\r\n \"data\/server-settings.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"name\": \"{{server.build.env.SERVER_NAME}}\",\r\n \"description\": \"{{server.build.env.SERVER_DESC}}\",\r\n \"max_players\": \"{{server.build.env.MAX_SLOTS}}\",\r\n \"username\": \"{{server.build.env.SERVER_USERNAME}}\",\r\n \"token\": \"{{server.build.env.SERVER_TOKEN}}\",\r\n \"autosave_interval\": \"{{server.build.env.SAVE_INTERVAL}}\",\r\n \"autosave_slots\": \"{{server.build.env.SAVE_SLOTS}}\",\r\n \"afk_autokick_interval\": \"{{server.build.env.AFK_KICK}}\",\r\n \"game_password\": \"{{server.build.env.SERVER_PASSWORD}}\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"Hosting game at\"\r\n}",
"stop": "/quit"
"logs": "{}",
"stop": "\/quit"
},
"scripts": {
"installation": {
"container": "ghcr.io/parkervcp/installers:debian",
"entrypoint": "bash",
"script": "#!/bin/bash\r\n# Factorio Installation Script\r\n#\r\n# Server Files: /mnt/server\r\napt update \r\napt install -y curl tar xz-utils jq\r\n\r\nVERSION_JSON=$(curl -sSL https://factorio.com/api/latest-releases)\r\n\r\nlatest_stable=$(echo $VERSION_JSON | jq -r '.stable.headless')\r\nlatest_experimental=$(echo $VERSION_JSON | jq -r '.experimental.headless')\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\nmkdir -p /mnt/server\r\ncd /mnt/server\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\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\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\""
"script": "#!\/bin\/bash\r\n# Factorio Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update \r\napt install -y curl tar xz-utils jq\r\n\r\nVERSION_JSON=$(curl -sSL https:\/\/factorio.com\/api\/latest-releases)\r\n\r\nlatest_stable=$(echo $VERSION_JSON | jq -r '.stable.headless')\r\nlatest_experimental=$(echo $VERSION_JSON | jq -r '.experimental.headless')\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\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\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\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\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"",
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
@ -128,6 +128,16 @@
"rules": "required|numeric|digits_between:1,3",
"field_type": "text"
},
{
"name": "Server password",
"description": "The password for the server.",
"env_variable": "SERVER_PASSWORD",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "max:40",
"field_type": "text"
},
{
"name": "BOX64_DYNAREC_SAFEFLAGS",
"description": "",

View File

@ -1,30 +1,30 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL",
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"update_url": null,
"version": "PTDL_v2"
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2024-06-01T00:17:37+00:00",
"exported_at": "2024-09-08T19:55:12+02:00",
"name": "Factorio",
"author": "parker@parkervcp.com",
"description": "The vanilla Factorio server.\r\n\r\nhttps://www.factorio.com/",
"description": "The vanilla Factorio server.\r\n\r\nhttps:\/\/www.factorio.com\/",
"features": null,
"docker_images": {
"ghcr.io/parkervcp/yolks:debian": "ghcr.io/parkervcp/yolks:debian"
"ghcr.io\/parkervcp\/yolks:debian": "ghcr.io\/parkervcp\/yolks:debian"
},
"file_denylist": [],
"startup": "if [ ! -f \"./saves/{{SAVE_NAME}}.zip\" ]; then ./bin/x64/factorio --create ./saves/{{SAVE_NAME}}.zip --map-gen-settings data/map-gen-settings.json --map-settings data/map-settings.json; fi; ./bin/x64/factorio --port {{SERVER_PORT}} --server-settings data/server-settings.json --start-server saves/{{SAVE_NAME}}.zip",
"startup": "if [ ! -f \".\/saves\/{{SAVE_NAME}}.zip\" ]; then .\/bin\/x64\/factorio --create .\/saves\/{{SAVE_NAME}}.zip --map-gen-settings data\/map-gen-settings.json --map-settings data\/map-settings.json; fi; .\/bin\/x64\/factorio --port {{SERVER_PORT}} --server-settings data\/server-settings.json --start-server saves\/{{SAVE_NAME}}.zip",
"config": {
"files": "{\r\n \"data/server-settings.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"name\": \"{{server.build.env.SERVER_NAME}}\",\r\n \"description\": \"{{server.build.env.SERVER_DESC}}\",\r\n \"max_players\": \"{{server.build.env.MAX_SLOTS}}\",\r\n \"username\": \"{{server.build.env.SERVER_USERNAME}}\",\r\n \"token\": \"{{server.build.env.SERVER_TOKEN}}\",\r\n \"autosave_interval\": \"{{server.build.env.SAVE_INTERVAL}}\",\r\n \"autosave_slots\": \"{{server.build.env.SAVE_SLOTS}}\",\r\n \"afk_autokick_interval\": \"{{server.build.env.AFK_KICK}}\"\r\n }\r\n }\r\n}",
"logs": "{}",
"files": "{\r\n \"data\/server-settings.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"name\": \"{{server.build.env.SERVER_NAME}}\",\r\n \"description\": \"{{server.build.env.SERVER_DESC}}\",\r\n \"max_players\": \"{{server.build.env.MAX_SLOTS}}\",\r\n \"username\": \"{{server.build.env.SERVER_USERNAME}}\",\r\n \"token\": \"{{server.build.env.SERVER_TOKEN}}\",\r\n \"autosave_interval\": \"{{server.build.env.SAVE_INTERVAL}}\",\r\n \"autosave_slots\": \"{{server.build.env.SAVE_SLOTS}}\",\r\n \"afk_autokick_interval\": \"{{server.build.env.AFK_KICK}}\",\r\n \"game_password\": \"{{server.build.env.SERVER_PASSWORD}}\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"Hosting game at\"\r\n}",
"stop": "/quit"
"logs": "{}",
"stop": "\/quit"
},
"scripts": {
"installation": {
"container": "ghcr.io/parkervcp/installers:debian",
"entrypoint": "bash",
"script": "#!/bin/bash\r\n# Factorio Installation Script\r\n#\r\n# Server Files: /mnt/server\r\napt update \r\napt install -y curl tar xz-utils jq\r\n\r\nVERSION_JSON=$(curl -sSL https://factorio.com/api/latest-releases)\r\n\r\nlatest_stable=$(echo $VERSION_JSON | jq -r '.stable.headless')\r\nlatest_experimental=$(echo $VERSION_JSON | jq -r '.experimental.headless')\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\nmkdir -p /mnt/server\r\ncd /mnt/server\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\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 ./saves/${SAVE_NAME}.zip ]; then\r\n echo \"save file exists\"\r\nelse\r\n ./bin/x64/factorio --create ./saves/${SAVE_NAME} --map-gen-settings data/map-gen-settings.json --map-settings data/map-settings.json\r\n chmod o+w ./saves/${SAVE_NAME}.zip\r\nfi\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\""
"script": "#!\/bin\/bash\r\n# Factorio Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update \r\napt install -y curl tar xz-utils jq\r\n\r\nVERSION_JSON=$(curl -sSL https:\/\/factorio.com\/api\/latest-releases)\r\n\r\nlatest_stable=$(echo $VERSION_JSON | jq -r '.stable.headless')\r\nlatest_experimental=$(echo $VERSION_JSON | jq -r '.experimental.headless')\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\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\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\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 .\/saves\/${SAVE_NAME}.zip ]; then\r\n echo \"save file exists\"\r\nelse\r\n .\/bin\/x64\/factorio --create .\/saves\/${SAVE_NAME} --map-gen-settings data\/map-gen-settings.json --map-settings data\/map-settings.json\r\n chmod o+w .\/saves\/${SAVE_NAME}.zip\r\nfi\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"",
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
@ -127,6 +127,16 @@
"user_editable": true,
"rules": "required|numeric|digits_between:1,3",
"field_type": "text"
},
{
"name": "Server password",
"description": "The password for the server.",
"env_variable": "SERVER_PASSWORD",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "max:40",
"field_type": "text"
}
]
}