From 48adca2c00dd63700484086f645790bb09a40267 Mon Sep 17 00:00:00 2001 From: TekExplorer Date: Wed, 10 Feb 2021 20:53:17 +0000 Subject: [PATCH 01/16] Add Latest Snapshot to Vanilla Egg --- .../Seeders/eggs/minecraft/egg-vanilla-minecraft.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/database/Seeders/eggs/minecraft/egg-vanilla-minecraft.json b/database/Seeders/eggs/minecraft/egg-vanilla-minecraft.json index 6f46e527e..736555714 100644 --- a/database/Seeders/eggs/minecraft/egg-vanilla-minecraft.json +++ b/database/Seeders/eggs/minecraft/egg-vanilla-minecraft.json @@ -3,12 +3,15 @@ "meta": { "version": "PTDL_v1" }, - "exported_at": "2020-11-03T04:22:56+00:00", + "exported_at": "2021-02-10T15:36:26-05:00", "name": "Vanilla Minecraft", "author": "support@pterodactyl.io", "description": "Minecraft is a game about placing blocks and going on adventures. Explore randomly generated worlds and build amazing things from the simplest of homes to the grandest of castles. Play in Creative Mode with unlimited resources or mine deep in Survival Mode, crafting weapons and armor to fend off dangerous mobs. Do all this alone or with friends.", "features": ["eula"], - "images": ["quay.io\/pterodactyl\/core:java", "quay.io\/pterodactyl\/core:java-11"], + "images": [ + "quay.io\/pterodactyl\/core:java", + "quay.io\/pterodactyl\/core:java-11" + ], "startup": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}", "config": { "files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"enable-query\": \"true\",\r\n \"server-port\": \"{{server.build.default.port}}\"\r\n }\r\n }\r\n}", @@ -18,7 +21,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Vanilla MC Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y jq curl\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_VERSION=`curl https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq -r '.latest.release'`\r\n\r\necho -e \"latest version is $LATEST_VERSION\"\r\n\r\nif [ -z \"$VANILLA_VERSION\" ] || [ \"$VANILLA_VERSION\" == \"latest\" ]; then\r\n MANIFEST_URL=$(curl -sSL https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq --arg VERSION $LATEST_VERSION -r '.versions | .[] | select(.id== $VERSION )|.url')\r\nelse\r\n MANIFEST_URL=$(curl -sSL https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq --arg VERSION $VANILLA_VERSION -r '.versions | .[] | select(.id== $VERSION )|.url')\r\nfi\r\n\r\nDOWNLOAD_URL=$(curl ${MANIFEST_URL} | jq .downloads.server | jq -r '. | .url')\r\n\r\necho -e \"running: curl -o ${SERVER_JARFILE} $DOWNLOAD_URL\"\r\ncurl -o ${SERVER_JARFILE} $DOWNLOAD_URL\r\n\r\necho -e \"Install Complete\"", + "script": "#!\/bin\/bash\r\n# Vanilla MC Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y jq curl\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_VERSION=`curl https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq -r '.latest.release'`\r\nLATEST_SNAPSHOT_VERSION=`curl https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq -r '.latest.snapshot'`\r\n\r\necho -e \"latest version is $LATEST_VERSION\"\r\necho -e \"latest snapshot is $LATEST_SNAPSHOT_VERSION\"\r\n\r\nif [ -z \"$VANILLA_VERSION\" ] || [ \"$VANILLA_VERSION\" == \"latest\" ]; then\r\n MANIFEST_URL=$(curl -sSL https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq --arg VERSION $LATEST_VERSION -r '.versions | .[] | select(.id== $VERSION )|.url')\r\nelif [ -z \"$VANILLA_VERSION\" ] || [ \"$VANILLA_VERSION\" == \"snapshot\" ]; then\r\n MANIFEST_URL=$(curl -sSL https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq --arg VERSION $LATEST_SNAPSHOT_VERSION -r '.versions | .[] | select(.id== $VERSION )|.url')\r\nelse\r\n MANIFEST_URL=$(curl -sSL https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq --arg VERSION $VANILLA_VERSION -r '.versions | .[] | select(.id== $VERSION )|.url')\r\nfi\r\n\r\nDOWNLOAD_URL=$(curl ${MANIFEST_URL} | jq .downloads.server | jq -r '. | .url')\r\n\r\necho -e \"running: curl -o ${SERVER_JARFILE} $DOWNLOAD_URL\"\r\ncurl -o ${SERVER_JARFILE} $DOWNLOAD_URL\r\n\r\necho -e \"Install Complete\"", "container": "debian:buster-slim", "entrypoint": "bash" } @@ -35,7 +38,7 @@ }, { "name": "Server Version", - "description": "The version of Minecraft Vanilla to install. Use \"latest\" to install the latest version.", + "description": "The version of Minecraft Vanilla to install. Use \"latest\" to install the latest version, or use \"snapshot\" to install the latest snapshot.", "env_variable": "VANILLA_VERSION", "default_value": "latest", "user_viewable": true, From d644387a335f703ef241dc3ce5aa4568dd043d0c Mon Sep 17 00:00:00 2001 From: Omar Kamel <30291302+TekExplorer@users.noreply.github.com> Date: Wed, 10 Feb 2021 17:07:43 -0500 Subject: [PATCH 02/16] remove unecessary bit --- database/Seeders/eggs/minecraft/egg-vanilla-minecraft.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/Seeders/eggs/minecraft/egg-vanilla-minecraft.json b/database/Seeders/eggs/minecraft/egg-vanilla-minecraft.json index 736555714..cba10959e 100644 --- a/database/Seeders/eggs/minecraft/egg-vanilla-minecraft.json +++ b/database/Seeders/eggs/minecraft/egg-vanilla-minecraft.json @@ -21,7 +21,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Vanilla MC Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y jq curl\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_VERSION=`curl https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq -r '.latest.release'`\r\nLATEST_SNAPSHOT_VERSION=`curl https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq -r '.latest.snapshot'`\r\n\r\necho -e \"latest version is $LATEST_VERSION\"\r\necho -e \"latest snapshot is $LATEST_SNAPSHOT_VERSION\"\r\n\r\nif [ -z \"$VANILLA_VERSION\" ] || [ \"$VANILLA_VERSION\" == \"latest\" ]; then\r\n MANIFEST_URL=$(curl -sSL https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq --arg VERSION $LATEST_VERSION -r '.versions | .[] | select(.id== $VERSION )|.url')\r\nelif [ -z \"$VANILLA_VERSION\" ] || [ \"$VANILLA_VERSION\" == \"snapshot\" ]; then\r\n MANIFEST_URL=$(curl -sSL https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq --arg VERSION $LATEST_SNAPSHOT_VERSION -r '.versions | .[] | select(.id== $VERSION )|.url')\r\nelse\r\n MANIFEST_URL=$(curl -sSL https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq --arg VERSION $VANILLA_VERSION -r '.versions | .[] | select(.id== $VERSION )|.url')\r\nfi\r\n\r\nDOWNLOAD_URL=$(curl ${MANIFEST_URL} | jq .downloads.server | jq -r '. | .url')\r\n\r\necho -e \"running: curl -o ${SERVER_JARFILE} $DOWNLOAD_URL\"\r\ncurl -o ${SERVER_JARFILE} $DOWNLOAD_URL\r\n\r\necho -e \"Install Complete\"", + "script": "#!\/bin\/bash\r\n# Vanilla MC Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y jq curl\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nLATEST_VERSION=`curl https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq -r '.latest.release'`\r\nLATEST_SNAPSHOT_VERSION=`curl https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq -r '.latest.snapshot'`\r\n\r\necho -e \"latest version is $LATEST_VERSION\"\r\necho -e \"latest snapshot is $LATEST_SNAPSHOT_VERSION\"\r\n\r\nif [ -z \"$VANILLA_VERSION\" ] || [ \"$VANILLA_VERSION\" == \"latest\" ]; then\r\n MANIFEST_URL=$(curl -sSL https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq --arg VERSION $LATEST_VERSION -r '.versions | .[] | select(.id== $VERSION )|.url')\r\nelif [ \"$VANILLA_VERSION\" == \"snapshot\" ]; then\r\n MANIFEST_URL=$(curl -sSL https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq --arg VERSION $LATEST_SNAPSHOT_VERSION -r '.versions | .[] | select(.id== $VERSION )|.url')\r\nelse\r\n MANIFEST_URL=$(curl -sSL https:\/\/launchermeta.mojang.com\/mc\/game\/version_manifest.json | jq --arg VERSION $VANILLA_VERSION -r '.versions | .[] | select(.id== $VERSION )|.url')\r\nfi\r\n\r\nDOWNLOAD_URL=$(curl ${MANIFEST_URL} | jq .downloads.server | jq -r '. | .url')\r\n\r\necho -e \"running: curl -o ${SERVER_JARFILE} $DOWNLOAD_URL\"\r\ncurl -o ${SERVER_JARFILE} $DOWNLOAD_URL\r\n\r\necho -e \"Install Complete\"", "container": "debian:buster-slim", "entrypoint": "bash" } From deaeb3fa99e6c4130072f360b5d6d594158f5806 Mon Sep 17 00:00:00 2001 From: Cyra Westmere Date: Thu, 11 Feb 2021 13:29:33 -0800 Subject: [PATCH 03/16] Fixed a typo on Line 10 "in isolated Docker container" -> "in isolated Docker conatiners" Fixed a typo in SpillHosting's Company: "which aims to cheap services" -> "which aims for cheap services" Added CHS to sponsors --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 418135fa3..673cfc88f 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,10 @@ I would like to extend my sincere thanks to the following sponsors for helping f | [**Skynode**](https://www.skynode.pro/) | Skynode provides blazing fast game servers along with a top-notch user experience. Whatever our clients are looking for, we're able to provide it! | | [**XCORE**](https://xcore-server.de/) | XCORE offers High-End Servers for hosting and gaming since 2012. Fast, excellent and well-known for eSports Gaming. | | [**RoyaleHosting**](https://royalehosting.net/) | Build your dreams and deploy them with RoyaleHosting’s reliable servers and network. Easy to use, provisioned in a couple of minutes. | -| [**Spill Hosting**](https://spillhosting.no/) | Spill Hosting is a Norwegian hosting service, which aims to cheap services on quality servers. Premium i9-9900K processors will run your game like a dream. | +| [**Spill Hosting**](https://spillhosting.no/) | Spill Hosting is a Norwegian hosting service, which aims for cheap services on quality servers. Premium i9-9900K processors will run your game like a dream. | | [**DeinServerHost**](https://deinserverhost.de/) | DeinServerHost offers Dedicated, vps and Gameservers for many popular Games like Minecraft and Rust in Germany since 2013. | | [**HostBend**](https://hostbend.com/) | HostBend offers a variety of solutions for developers, students, and others who have a tight budget but don't want to compromise quality and support. | +| [**Capitol Hosting Solutions**](https://chs.gg/) | CHS is *the* budget friendly hosting company for Australian and American gamers, offering a variety of plans for all your hosting needs. | ## Documentation * [Panel Documentation](https://pterodactyl.io/panel/1.0/getting_started.html) From c9ebbf161ee82a39ed7dc987412df84ca252bf30 Mon Sep 17 00:00:00 2001 From: Cyra Westmere Date: Thu, 11 Feb 2021 13:36:53 -0800 Subject: [PATCH 04/16] Rewrote CHS after talking to the team. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 673cfc88f..f8d0d9c4e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ # Pterodactyl Panel Pterodactyl is an open-source game server management panel built with PHP 7, React, and Go. Designed with security -in mind, Pterodactyl runs all game servers in isolated Docker container while exposing a beautiful and intuitive +in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users. Stop settling for less. Make game servers a first class citizen on your platform. @@ -30,7 +30,7 @@ I would like to extend my sincere thanks to the following sponsors for helping f | [**Spill Hosting**](https://spillhosting.no/) | Spill Hosting is a Norwegian hosting service, which aims for cheap services on quality servers. Premium i9-9900K processors will run your game like a dream. | | [**DeinServerHost**](https://deinserverhost.de/) | DeinServerHost offers Dedicated, vps and Gameservers for many popular Games like Minecraft and Rust in Germany since 2013. | | [**HostBend**](https://hostbend.com/) | HostBend offers a variety of solutions for developers, students, and others who have a tight budget but don't want to compromise quality and support. | -| [**Capitol Hosting Solutions**](https://chs.gg/) | CHS is *the* budget friendly hosting company for Australian and American gamers, offering a variety of plans for all your hosting needs. | +| [**Capitol Hosting Solutions**](https://capitolsolutions.cloud/) | CHS is *the* budget friendly hosting company for Australian and American gamers, offering a variety of plans from Web Hosting to Game Servers; Custom Solutions too! | ## Documentation * [Panel Documentation](https://pterodactyl.io/panel/1.0/getting_started.html) From d67cd5f221840531256689c7ae3baa36178c3dd6 Mon Sep 17 00:00:00 2001 From: Cyra Westmere Date: Thu, 11 Feb 2021 13:44:35 -0800 Subject: [PATCH 05/16] Minor grammatical change to Spillhosting.no --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f8d0d9c4e..61660faba 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ I would like to extend my sincere thanks to the following sponsors for helping f | [**Skynode**](https://www.skynode.pro/) | Skynode provides blazing fast game servers along with a top-notch user experience. Whatever our clients are looking for, we're able to provide it! | | [**XCORE**](https://xcore-server.de/) | XCORE offers High-End Servers for hosting and gaming since 2012. Fast, excellent and well-known for eSports Gaming. | | [**RoyaleHosting**](https://royalehosting.net/) | Build your dreams and deploy them with RoyaleHosting’s reliable servers and network. Easy to use, provisioned in a couple of minutes. | -| [**Spill Hosting**](https://spillhosting.no/) | Spill Hosting is a Norwegian hosting service, which aims for cheap services on quality servers. Premium i9-9900K processors will run your game like a dream. | +| [**Spill Hosting**](https://spillhosting.no/) | Spill Hosting is a Norwegian hosting service, which aims for inexpensive services on quality servers. Premium i9-9900K processors will run your game like a dream. | | [**DeinServerHost**](https://deinserverhost.de/) | DeinServerHost offers Dedicated, vps and Gameservers for many popular Games like Minecraft and Rust in Germany since 2013. | | [**HostBend**](https://hostbend.com/) | HostBend offers a variety of solutions for developers, students, and others who have a tight budget but don't want to compromise quality and support. | | [**Capitol Hosting Solutions**](https://capitolsolutions.cloud/) | CHS is *the* budget friendly hosting company for Australian and American gamers, offering a variety of plans from Web Hosting to Game Servers; Custom Solutions too! | From 3171b8d559a42c6b9eef1bf024b23546f0874f1f Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 17 Feb 2021 20:58:47 -0800 Subject: [PATCH 06/16] Show correct server suspended image; closes #3092 --- resources/scripts/routers/ServerRouter.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/resources/scripts/routers/ServerRouter.tsx b/resources/scripts/routers/ServerRouter.tsx index f62c9c9fe..a1fff7939 100644 --- a/resources/scripts/routers/ServerRouter.tsx +++ b/resources/scripts/routers/ServerRouter.tsx @@ -31,6 +31,7 @@ import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons'; import RequireServerPermission from '@/hoc/RequireServerPermission'; import ServerInstallSvg from '@/assets/images/server_installing.svg'; import ServerRestoreSvg from '@/assets/images/server_restore.svg'; +import ServerErrorSvg from '@/assets/images/server_error.svg'; const ConflictStateRenderer = () => { const status = ServerContext.useStoreState(state => state.server.data?.status || null); @@ -44,11 +45,18 @@ const ConflictStateRenderer = () => { message={'Your server should be ready soon, please try again in a few minutes.'} /> : - + status === 'suspended' ? + + : + ); }; From 94ea9c37d0c7108247559a1bccfd7bd688631b92 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 17 Feb 2021 21:11:23 -0800 Subject: [PATCH 07/16] Don't require auto-allocation settings if not enabled; closes #3085 --- .../Settings/AdvancedSettingsFormRequest.php | 15 +++++++++++++-- resources/views/admin/settings/advanced.blade.php | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app/Http/Requests/Admin/Settings/AdvancedSettingsFormRequest.php b/app/Http/Requests/Admin/Settings/AdvancedSettingsFormRequest.php index e69bd9ba6..c53825ffe 100644 --- a/app/Http/Requests/Admin/Settings/AdvancedSettingsFormRequest.php +++ b/app/Http/Requests/Admin/Settings/AdvancedSettingsFormRequest.php @@ -20,8 +20,19 @@ class AdvancedSettingsFormRequest extends AdminFormRequest 'pterodactyl:guzzle:timeout' => 'required|integer|between:1,60', 'pterodactyl:guzzle:connect_timeout' => 'required|integer|between:1,60', 'pterodactyl:client_features:allocations:enabled' => 'required|in:true,false', - 'pterodactyl:client_features:allocations:range_start' => 'required|integer|between:1024,65535', - 'pterodactyl:client_features:allocations:range_end' => 'required|integer|between:1024,65535', + 'pterodactyl:client_features:allocations:range_start' => [ + 'nullable', + 'required_if:pterodactyl:client_features:allocations:enabled,true', + 'integer', + 'between:1024,65535', + ], + 'pterodactyl:client_features:allocations:range_end' => [ + 'nullable', + 'required_if:pterodactyl:client_features:allocations:enabled,true', + 'integer', + 'between:1024,65535', + 'gt:pterodactyl:client_features:allocations:range_start', + ], ]; } diff --git a/resources/views/admin/settings/advanced.blade.php b/resources/views/admin/settings/advanced.blade.php index 3e92e7761..0f2056ca4 100644 --- a/resources/views/admin/settings/advanced.blade.php +++ b/resources/views/admin/settings/advanced.blade.php @@ -101,14 +101,14 @@
- +

The starting port in the range that can be automatically allocated.

- +

The ending port in the range that can be automatically allocated.

From b92712e9900b9edac3aad8555eba3336b6c02d3d Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 17 Feb 2021 21:26:40 -0800 Subject: [PATCH 08/16] Remove max height; fixes overflow issues with small browser font sizes; closes #2799 closes #3084 --- resources/scripts/components/server/Console.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/resources/scripts/components/server/Console.tsx b/resources/scripts/components/server/Console.tsx index ccae2f08b..22d035a6c 100644 --- a/resources/scripts/components/server/Console.tsx +++ b/resources/scripts/components/server/Console.tsx @@ -212,10 +212,7 @@ export default () => { tw`rounded-t p-2 bg-black w-full`, !canSendCommands && tw`rounded-b`, ]} - style={{ - minHeight: '16rem', - maxHeight: '32rem', - }} + style={{ minHeight: '16rem' }} > From 42aae1d9f168599248fafb6b4515176ada4d7a64 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 17 Feb 2021 21:32:36 -0800 Subject: [PATCH 09/16] Fix search/copy on osx --- resources/scripts/components/server/Console.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/resources/scripts/components/server/Console.tsx b/resources/scripts/components/server/Console.tsx index 22d035a6c..4301cd974 100644 --- a/resources/scripts/components/server/Console.tsx +++ b/resources/scripts/components/server/Console.tsx @@ -144,23 +144,16 @@ export default () => { // Add support for capturing keys terminal.attachCustomKeyEventHandler((e: KeyboardEvent) => { - // Ctrl + C (Copy) - if (e.ctrlKey && e.key === 'c') { + if (e.metaKey && e.key === 'c') { document.execCommand('copy'); return false; - } - - // Ctrl + F (Find) - if (e.ctrlKey && e.key === 'f') { + } else if (e.metaKey && e.key === 'f') { + e.preventDefault(); searchBar.show(); return false; - } - - // Escape - if (e.key === 'Escape') { + } else if (e.key === 'Escape') { searchBar.hidden(); } - return true; }); } From d0afb29ae8e607819bfb49c8439614856a3bb3f5 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 22 Feb 2021 15:47:34 +0200 Subject: [PATCH 10/16] Change input rule --- database/Seeders/eggs/rust/egg-rust.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/Seeders/eggs/rust/egg-rust.json b/database/Seeders/eggs/rust/egg-rust.json index 0172146ff..8f6f82867 100644 --- a/database/Seeders/eggs/rust/egg-rust.json +++ b/database/Seeders/eggs/rust/egg-rust.json @@ -121,7 +121,7 @@ "default_value": "CHANGEME", "user_viewable": true, "user_editable": true, - "rules": "required|string|max:64" + "rules": "required|regex:\/^[a-zA-Z0-9_.-]*$\/|max:64" }, { "name": "Save Interval", @@ -160,4 +160,4 @@ "rules": "nullable|url" } ] -} \ No newline at end of file +} From e636f69113e260149ef5c3fef3926ac51dc93b8b Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 22 Feb 2021 17:09:46 +0200 Subject: [PATCH 11/16] Fix server.jar renaming --- .../eggs/minecraft/egg-forge-minecraft.json | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/database/Seeders/eggs/minecraft/egg-forge-minecraft.json b/database/Seeders/eggs/minecraft/egg-forge-minecraft.json index ef84a8d19..986602c19 100644 --- a/database/Seeders/eggs/minecraft/egg-forge-minecraft.json +++ b/database/Seeders/eggs/minecraft/egg-forge-minecraft.json @@ -1,14 +1,20 @@ { "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", "meta": { - "version": "PTDL_v1" + "version": "PTDL_v1", + "update_url": null }, - "exported_at": "2020-12-06T17:39:27-08:00", + "exported_at": "2021-02-22T19:08:49+04:00", "name": "Forge Minecraft", "author": "support@pterodactyl.io", "description": "Minecraft Forge Server. Minecraft Forge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other.", - "features": ["eula"], - "images": ["quay.io\/pterodactyl\/core:java", "quay.io\/pterodactyl\/core:java-11"], + "features": [ + "eula" + ], + "images": [ + "quay.io\/pterodactyl\/core:java", + "quay.io\/pterodactyl\/core:java-11" + ], "startup": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}", "config": { "files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"enable-query\": \"true\",\r\n \"server-port\": \"{{server.build.default.port}}\",\r\n \"query.port\": \"{{server.build.default.port}}\"\r\n }\r\n }\r\n}", @@ -18,7 +24,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Forge Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl jq\r\n\r\n#Go into main direction\r\nif [ ! -d \/mnt\/server ]; then\r\n mkdir \/mnt\/server\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\nif [ ! -z ${FORGE_VERSION} ]; then\r\n DOWNLOAD_LINK=https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/${FORGE_VERSION}\/forge-${FORGE_VERSION}\r\nelse\r\n JSON_DATA=$(curl -sSL https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/promotions_slim.json)\r\n\r\n if [ \"${MC_VERSION}\" == \"latest\" ] || [ \"${MC_VERSION}\" == \"\" ] ; then\r\n echo -e \"getting latest recommended version of forge.\"\r\n MC_VERSION=$(echo -e ${JSON_DATA} | jq -r '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains(\"recommended\")) | split(\"-\")[0]' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -1)\r\n \tBUILD_TYPE=recommended\r\n fi\r\n\r\n if [ \"${BUILD_TYPE}\" != \"recommended\" ] && [ \"${BUILD_TYPE}\" != \"latest\" ]; then\r\n BUILD_TYPE=recommended\r\n fi\r\n\r\n echo -e \"minecraft version: ${MC_VERSION}\"\r\n echo -e \"build type: ${BUILD_TYPE}\"\r\n\r\n ## some variables for getting versions and things\r\n FILE_SITE=$(echo -e ${JSON_DATA} | jq -r '.homepage' | sed \"s\/http:\/https:\/g\")\r\n VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION \"${MC_VERSION}\" --arg BUILD_TYPE \"${BUILD_TYPE}\" '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains($BUILD_TYPE))')\r\n\r\n ## locating the forge version\r\n if [ \"${VERSION_KEY}\" == \"\" ] && [ \"${BUILD_TYPE}\" == \"recommended\" ]; then\r\n echo -e \"dropping back to latest from recommended due to there not being a recommended version of forge for the mc version requested.\"\r\n VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION \"${MC_VERSION}\" '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains(\"recommended\"))')\r\n fi\r\n\r\n ## Error if the mc version set wasn't valid.\r\n if [ \"${VERSION_KEY}\" == \"\" ] || [ \"${VERSION_KEY}\" == \"null\" ]; then\r\n \techo -e \"The install failed because there is no valid version of forge for the version on minecraft selected.\"\r\n \texit 1\r\n fi\r\n\r\n FORGE_VERSION=$(echo -e ${JSON_DATA} | jq -r --arg VERSION_KEY \"$VERSION_KEY\" '.promos | .[$VERSION_KEY]')\r\n\r\n if [ \"${MC_VERSION}\" == \"1.7.10\" ] || [ \"${MC_VERSION}\" == \"1.8.9\" ]; then\r\n DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}\/forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}.jar\r\n if [ \"${MC_VERSION}\" == \"1.7.10\" ]; then\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}-universal.jar\r\n fi\r\n else\r\n DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}\/forge-${MC_VERSION}-${FORGE_VERSION}\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}.jar\r\n fi\r\nfi\r\n\r\n\r\n#Adding .jar when not eding by SERVER_JARFILE\r\nif [[ ! $SERVER_JARFILE = *\\.jar ]]; then\r\n SERVER_JARFILE=\"$SERVER_JARFILE.jar\"\r\nfi\r\n\r\n#Downloading jars\r\necho -e \"Downloading forge version ${FORGE_VERSION}\"\r\necho -e \"Download link is ${DOWNLOAD_LINK}\"\r\nif [ ! -z \"${DOWNLOAD_LINK}\" ]; then \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK}-installer.jar; then\r\n echo -e \"installer jar download link is valid.\"\r\n else\r\n echo -e \"link is invalid closing out\"\r\n exit 2\r\n fi\r\nelse\r\n echo -e \"no download link closing out\"\r\n exit 3\r\nfi\r\n\r\ncurl -s -o installer.jar -sS ${DOWNLOAD_LINK}-installer.jar\r\n\r\n#Checking if downloaded jars exist\r\nif [ ! -f .\/installer.jar ]; then\r\n echo \"!!! Error by downloading forge version ${FORGE_VERSION} !!!\"\r\n exit\r\nfi\r\n\r\n#Installing server\r\necho -e \"Installing forge server.\\n\"\r\njava -jar installer.jar --installServer || { echo -e \"install failed\"; exit 4; }\r\n\r\nmv $FORGE_JAR $SERVER_JARFILE\r\n\r\n#Deleting installer.jar\r\necho -e \"Deleting installer.jar file.\\n\"\r\nrm -rf installer.jar", + "script": "#!\/bin\/bash\r\n# Forge Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl jq\r\n\r\n#Go into main direction\r\nif [ ! -d \/mnt\/server ]; then\r\n mkdir \/mnt\/server\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\nif [ ! -z ${FORGE_VERSION} ]; then\r\n DOWNLOAD_LINK=https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/${FORGE_VERSION}\/forge-${FORGE_VERSION}\r\n FORGE_JAR=forge-${FORGE_VERSION}.jar\r\nelse\r\n JSON_DATA=$(curl -sSL https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/promotions_slim.json)\r\n\r\n if [ \"${MC_VERSION}\" == \"latest\" ] || [ \"${MC_VERSION}\" == \"\" ] ; then\r\n echo -e \"getting latest recommended version of forge.\"\r\n MC_VERSION=$(echo -e ${JSON_DATA} | jq -r '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains(\"recommended\")) | split(\"-\")[0]' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -1)\r\n \tBUILD_TYPE=recommended\r\n fi\r\n\r\n if [ \"${BUILD_TYPE}\" != \"recommended\" ] && [ \"${BUILD_TYPE}\" != \"latest\" ]; then\r\n BUILD_TYPE=recommended\r\n fi\r\n\r\n echo -e \"minecraft version: ${MC_VERSION}\"\r\n echo -e \"build type: ${BUILD_TYPE}\"\r\n\r\n ## some variables for getting versions and things\r\n FILE_SITE=$(echo -e ${JSON_DATA} | jq -r '.homepage' | sed \"s\/http:\/https:\/g\")\r\n VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION \"${MC_VERSION}\" --arg BUILD_TYPE \"${BUILD_TYPE}\" '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains($BUILD_TYPE))')\r\n\r\n ## locating the forge version\r\n if [ \"${VERSION_KEY}\" == \"\" ] && [ \"${BUILD_TYPE}\" == \"recommended\" ]; then\r\n echo -e \"dropping back to latest from recommended due to there not being a recommended version of forge for the mc version requested.\"\r\n VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION \"${MC_VERSION}\" '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains(\"recommended\"))')\r\n fi\r\n\r\n ## Error if the mc version set wasn't valid.\r\n if [ \"${VERSION_KEY}\" == \"\" ] || [ \"${VERSION_KEY}\" == \"null\" ]; then\r\n \techo -e \"The install failed because there is no valid version of forge for the version on minecraft selected.\"\r\n \texit 1\r\n fi\r\n\r\n FORGE_VERSION=$(echo -e ${JSON_DATA} | jq -r --arg VERSION_KEY \"$VERSION_KEY\" '.promos | .[$VERSION_KEY]')\r\n\r\n if [ \"${MC_VERSION}\" == \"1.7.10\" ] || [ \"${MC_VERSION}\" == \"1.8.9\" ]; then\r\n DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}\/forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}.jar\r\n if [ \"${MC_VERSION}\" == \"1.7.10\" ]; then\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}-universal.jar\r\n fi\r\n else\r\n DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}\/forge-${MC_VERSION}-${FORGE_VERSION}\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}.jar\r\n fi\r\nfi\r\n\r\n\r\n#Adding .jar when not eding by SERVER_JARFILE\r\nif [[ ! $SERVER_JARFILE = *\\.jar ]]; then\r\n SERVER_JARFILE=\"$SERVER_JARFILE.jar\"\r\nfi\r\n\r\n#Downloading jars\r\necho -e \"Downloading forge version ${FORGE_VERSION}\"\r\necho -e \"Download link is ${DOWNLOAD_LINK}\"\r\nif [ ! -z \"${DOWNLOAD_LINK}\" ]; then \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK}-installer.jar; then\r\n echo -e \"installer jar download link is valid.\"\r\n else\r\n echo -e \"link is invalid closing out\"\r\n exit 2\r\n fi\r\nelse\r\n echo -e \"no download link closing out\"\r\n exit 3\r\nfi\r\n\r\ncurl -s -o installer.jar -sS ${DOWNLOAD_LINK}-installer.jar\r\n\r\n#Checking if downloaded jars exist\r\nif [ ! -f .\/installer.jar ]; then\r\n echo \"!!! Error by downloading forge version ${FORGE_VERSION} !!!\"\r\n exit\r\nfi\r\n\r\n#Installing server\r\necho -e \"Installing forge server.\\n\"\r\njava -jar installer.jar --installServer || { echo -e \"install failed\"; exit 4; }\r\n\r\nmv $FORGE_JAR $SERVER_JARFILE\r\n\r\n#Deleting installer.jar\r\necho -e \"Deleting installer.jar file.\\n\"\r\nrm -rf installer.jar", "container": "openjdk:8-jdk-slim", "entrypoint": "bash" } From 03a14338d0b537ab6f4d8919cbcaf30526ea3de2 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 22 Feb 2021 20:46:56 +0200 Subject: [PATCH 12/16] update regex rule --- database/Seeders/eggs/rust/egg-rust.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/Seeders/eggs/rust/egg-rust.json b/database/Seeders/eggs/rust/egg-rust.json index 8f6f82867..2fef9efda 100644 --- a/database/Seeders/eggs/rust/egg-rust.json +++ b/database/Seeders/eggs/rust/egg-rust.json @@ -121,7 +121,7 @@ "default_value": "CHANGEME", "user_viewable": true, "user_editable": true, - "rules": "required|regex:\/^[a-zA-Z0-9_.-]*$\/|max:64" + "rules": "required|regex:/^[\w.-]*$/|max:64" }, { "name": "Save Interval", From 5328cfd7601bff48b81cc440374e7e30e445d65d Mon Sep 17 00:00:00 2001 From: VinGal <45609819+VinGal0@users.noreply.github.com> Date: Tue, 23 Feb 2021 01:13:46 +0000 Subject: [PATCH 13/16] 2021_02_23_161404_UpdateDaemonSftp.php Migration File for DaemonSFTP --- .../2021_02_23_161404_UpdateDaemonSftp.php" | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 "database/migrations/unsignedSmallInteger('daemonSFTP')->default(2022)->change(); }); }/2021_02_23_161404_UpdateDaemonSftp.php" diff --git "a/database/migrations/unsignedSmallInteger('daemonSFTP')->default(2022)->change(); }); }/2021_02_23_161404_UpdateDaemonSftp.php" "b/database/migrations/unsignedSmallInteger('daemonSFTP')->default(2022)->change(); }); }/2021_02_23_161404_UpdateDaemonSftp.php" new file mode 100644 index 000000000..95d74f102 --- /dev/null +++ "b/database/migrations/unsignedSmallInteger('daemonSFTP')->default(2022)->change(); }); }/2021_02_23_161404_UpdateDaemonSftp.php" @@ -0,0 +1,33 @@ +unsignedSmallInteger('daemonSFTP')->default(2022)->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('nodes', function (Blueprint $table) { + $table->smallInteger('daemonSFTP')->default(2022); + }); + } +} From 717fbf30d2230be386987e8a755ba36cd0f3f088 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 23 Feb 2021 06:45:21 -0800 Subject: [PATCH 14/16] Revert "2021_02_23_161404_UpdateDaemonSftp.php" --- .../2021_02_23_161404_UpdateDaemonSftp.php" | 33 ------------------- 1 file changed, 33 deletions(-) delete mode 100644 "database/migrations/unsignedSmallInteger('daemonSFTP')->default(2022)->change(); }); }/2021_02_23_161404_UpdateDaemonSftp.php" diff --git "a/database/migrations/unsignedSmallInteger('daemonSFTP')->default(2022)->change(); }); }/2021_02_23_161404_UpdateDaemonSftp.php" "b/database/migrations/unsignedSmallInteger('daemonSFTP')->default(2022)->change(); }); }/2021_02_23_161404_UpdateDaemonSftp.php" deleted file mode 100644 index 95d74f102..000000000 --- "a/database/migrations/unsignedSmallInteger('daemonSFTP')->default(2022)->change(); }); }/2021_02_23_161404_UpdateDaemonSftp.php" +++ /dev/null @@ -1,33 +0,0 @@ -unsignedSmallInteger('daemonSFTP')->default(2022)->change(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('nodes', function (Blueprint $table) { - $table->smallInteger('daemonSFTP')->default(2022); - }); - } -} From 1b2c4931ee2f181a53d7dc6eb5107647686c6837 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 23 Feb 2021 21:20:02 -0800 Subject: [PATCH 15/16] Add endpoint logic necessary to reset server states if they get stuck installing/restoring when wings restarts --- .../Servers/ServerDetailsController.php | 66 +++++++++++++++++++ ...205021_add_index_for_server_and_action.php | 39 +++++++++++ routes/api-remote.php | 1 + 3 files changed, 106 insertions(+) create mode 100644 database/migrations/2021_02_23_205021_add_index_for_server_and_action.php diff --git a/app/Http/Controllers/Api/Remote/Servers/ServerDetailsController.php b/app/Http/Controllers/Api/Remote/Servers/ServerDetailsController.php index a409d494b..3bf36a5ae 100644 --- a/app/Http/Controllers/Api/Remote/Servers/ServerDetailsController.php +++ b/app/Http/Controllers/Api/Remote/Servers/ServerDetailsController.php @@ -4,7 +4,10 @@ namespace Pterodactyl\Http\Controllers\Api\Remote\Servers; use Illuminate\Http\Request; use Pterodactyl\Models\Server; +use Pterodactyl\Models\AuditLog; use Illuminate\Http\JsonResponse; +use Illuminate\Database\Query\Builder; +use Illuminate\Database\Query\JoinClause; use Pterodactyl\Http\Controllers\Controller; use Pterodactyl\Repositories\Eloquent\NodeRepository; use Pterodactyl\Services\Eggs\EggConfigurationService; @@ -83,4 +86,67 @@ class ServerDetailsController extends Controller return new ServerConfigurationCollection($servers); } + + /** + * Resets the state of all servers on the node to be normal. This is triggered + * when Wings restarts and is useful for ensuring that any servers on the node + * do not get incorrectly stuck in installing/restoring from backup states since + * a Wings reboot would completely stop those processes. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\JsonResponse + * + * @throws \Throwable + */ + public function resetState(Request $request) + { + $node = $request->attributes->get('node'); + + // Get all of the servers that are currently marked as restoring from a backup + // on this node that do not have a failed backup tracked in the audit logs table + // as well. + // + // For each of those servers we'll track a new audit log entry to mark them as + // failed and then update them all to be in a valid state. + /** @var \Pterodactyl\Models\Server[] $servers */ + $servers = Server::query() + ->select('servers.*') + ->selectRaw('started.metadata->>"$.backup_uuid" as backup_uuid') + ->leftJoinSub(function (Builder $builder) { + $builder->select('*')->from('audit_logs') + ->where('action', AuditLog::SERVER__BACKUP_RESTORE_STARTED) + ->orderByDesc('created_at') + ->limit(1); + }, 'started', 'started.server_id', '=', 'servers.id') + ->leftJoin('audit_logs as completed', function (JoinClause $clause) { + $clause->whereColumn('completed.created_at', '>', 'started.created_at') + ->whereIn('completed.action', [ + AuditLog::SERVER__BACKUP_RESTORE_COMPLETED, + AuditLog::SERVER__BACKUP_RESTORE_FAILED, + ]); + }) + ->whereNotNull('started.id') + ->whereNull('completed.id') + ->where('servers.node_id', $node->id) + ->where('servers.status', Server::STATUS_RESTORING_BACKUP) + ->get(); + + foreach ($servers as $server) { + // Just create a new audit entry for this event and update the server state + // so that power actions, file management, and backups can resume as normal. + $server->audit(AuditLog::SERVER__BACKUP_RESTORE_FAILED, function (AuditLog $audit, Server $server) { + $audit->is_system = true; + $audit->metadata = ['backup_uuid' => $server->getAttribute('backup_uuid')]; + $server->update(['status' => null]); + }); + } + + // Update any server marked as installing or restoring as being in a normal state + // at this point in the process. + Server::query()->where('node_id', $node->id) + ->whereIn('status', [Server::STATUS_INSTALLING, Server::STATUS_RESTORING_BACKUP]) + ->update(['status' => null]); + + return new JsonResponse([], JsonResponse::HTTP_NO_CONTENT); + } } diff --git a/database/migrations/2021_02_23_205021_add_index_for_server_and_action.php b/database/migrations/2021_02_23_205021_add_index_for_server_and_action.php new file mode 100644 index 000000000..9bf0a34e3 --- /dev/null +++ b/database/migrations/2021_02_23_205021_add_index_for_server_and_action.php @@ -0,0 +1,39 @@ +index(['action', 'server_id']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('audit_logs', function (Blueprint $table) { + $table->dropIndex(['action', 'server_id']); + }); + } +} diff --git a/routes/api-remote.php b/routes/api-remote.php index 25c74f2d9..3d4839324 100644 --- a/routes/api-remote.php +++ b/routes/api-remote.php @@ -6,6 +6,7 @@ use Illuminate\Support\Facades\Route; Route::post('/sftp/auth', 'SftpAuthenticationController'); Route::get('/servers', 'Servers\ServerDetailsController@list'); +Route::post('/servers/reset', 'Servers\ServerDetailsController@resetState'); Route::group(['prefix' => '/servers/{uuid}'], function () { Route::get('/', 'Servers\ServerDetailsController'); From 7d0f299b303c2ddf6ddc930da91df0e9a3c57080 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 23 Feb 2021 21:28:33 -0800 Subject: [PATCH 16/16] Fix sftp port being signed int; closes #2992 --- ..._23_212657_make_sftp_port_unsigned_int.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 database/migrations/2021_02_23_212657_make_sftp_port_unsigned_int.php diff --git a/database/migrations/2021_02_23_212657_make_sftp_port_unsigned_int.php b/database/migrations/2021_02_23_212657_make_sftp_port_unsigned_int.php new file mode 100644 index 000000000..580e07e48 --- /dev/null +++ b/database/migrations/2021_02_23_212657_make_sftp_port_unsigned_int.php @@ -0,0 +1,32 @@ +unsignedSmallInteger('daemonSFTP')->default(2022)->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('nodes', function (Blueprint $table) { + $table->smallInteger('daemonSFTP')->default(2022)->change(); + }); + } +}