From 5f308feb3f0da5da35cce1c19ed1558f31cddf39 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 18 Jan 2022 21:34:44 +0200 Subject: [PATCH 01/17] feat(model/pid): lowercase error array element (#3892) --- .../scripts/components/server/features/PIDLimitModalFeature.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/scripts/components/server/features/PIDLimitModalFeature.tsx b/resources/scripts/components/server/features/PIDLimitModalFeature.tsx index 821a31068..0c01533bc 100644 --- a/resources/scripts/components/server/features/PIDLimitModalFeature.tsx +++ b/resources/scripts/components/server/features/PIDLimitModalFeature.tsx @@ -24,7 +24,7 @@ const PIDLimitModalFeature = () => { const errors = [ 'pthread_create failed', - 'Exception in thread "Craft Async Scheduler Management Thread"', + 'exception in thread "craft async scheduler management thread"', 'unable to create new native thread', 'unable to create native thread', ]; From 1f3217c3c54ff3a59244b1ea3c1b2e12a60f7fb1 Mon Sep 17 00:00:00 2001 From: Mrxbox98 <29240392+mrxbox98@users.noreply.github.com> Date: Tue, 18 Jan 2022 11:49:06 -0800 Subject: [PATCH 02/17] fix(server/files): duplicate entry when making a nested folder (#3813) --- .../scripts/components/server/files/FileManagerContainer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/scripts/components/server/files/FileManagerContainer.tsx b/resources/scripts/components/server/files/FileManagerContainer.tsx index 0e5b10645..47910b8c3 100644 --- a/resources/scripts/components/server/files/FileManagerContainer.tsx +++ b/resources/scripts/components/server/files/FileManagerContainer.tsx @@ -22,8 +22,8 @@ import { FileActionCheckbox } from '@/components/server/files/SelectFileCheckbox import { hashToPath } from '@/helpers'; const sortFiles = (files: FileObject[]): FileObject[] => { - return files.sort((a, b) => a.name.localeCompare(b.name)) - .sort((a, b) => a.isFile === b.isFile ? 0 : (a.isFile ? 1 : -1)); + const sortedFiles: FileObject[] = files.sort((a, b) => a.name.localeCompare(b.name)).sort((a, b) => a.isFile === b.isFile ? 0 : (a.isFile ? 1 : -1)); + return sortedFiles.filter((file, index) => index === 0 || file.name !== sortedFiles[index - 1].name); }; export default () => { From 0ff2f28cede94b2084c849dec82be6b826f9c187 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 18 Jan 2022 22:00:10 +0200 Subject: [PATCH 03/17] feat(egg): Add Steam out of disk space modal (#3891) --- database/Seeders/eggs/rust/egg-rust.json | 12 +-- .../egg-ark--survival-evolved.json | 10 ++- ...egg-counter--strike--global-offensive.json | 10 ++- .../egg-custom-source-engine-game.json | 11 ++- .../eggs/source-engine/egg-garrys-mod.json | 9 ++- .../eggs/source-engine/egg-insurgency.json | 12 +-- .../source-engine/egg-team-fortress2.json | 12 +-- .../components/server/ServerConsole.tsx | 3 +- .../server/features/SteamDiskSpaceFeature.tsx | 78 +++++++++++++++++++ .../components/server/features/index.ts | 3 +- 10 files changed, 127 insertions(+), 33 deletions(-) create mode 100644 resources/scripts/components/server/features/SteamDiskSpaceFeature.tsx diff --git a/database/Seeders/eggs/rust/egg-rust.json b/database/Seeders/eggs/rust/egg-rust.json index 60144bfa7..ddbf88cdb 100644 --- a/database/Seeders/eggs/rust/egg-rust.json +++ b/database/Seeders/eggs/rust/egg-rust.json @@ -4,11 +4,13 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-09-15T17:07:50-04:00", + "exported_at": "2022-01-18T11:44:55-05:00", "name": "Rust", "author": "support@pterodactyl.io", "description": "The only aim in Rust is to survive. To do this you will need to overcome struggles such as hunger, thirst and cold. Build a fire. Build a shelter. Kill animals for meat. Protect yourself from other players, and kill them for meat. Create alliances with other players and form a town. Do whatever it takes to survive.", - "features": null, + "features": [ + "steam_disk_space" + ], "images": [ "quay.io\/pterodactyl\/core:rust" ], @@ -22,8 +24,8 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n# Image to install with is 'debian:buster-slim'\r\napt -y update\r\napt -y --no-install-recommends install curl lib32gcc1 ca-certificates\r\n\r\nSRCDS_APPID=258550\r\n\r\n## just in case someone removed the defaults.\r\nif [ \"${STEAM_USER}\" == \"\" ]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +force_install_dir \/mnt\/server +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so", - "container": "debian:buster-slim", + "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\nSRCDS_APPID=258550\r\n\r\n## just in case someone removed the defaults.\r\nif [ \"${STEAM_USER}\" == \"\" ]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so", + "container": "ghcr.io\/pterodactyl\/installers:debian", "entrypoint": "bash" } }, @@ -173,4 +175,4 @@ "rules": "nullable|url" } ] -} \ No newline at end of file +} diff --git a/database/Seeders/eggs/source-engine/egg-ark--survival-evolved.json b/database/Seeders/eggs/source-engine/egg-ark--survival-evolved.json index 0ea63b6aa..584ffe37c 100644 --- a/database/Seeders/eggs/source-engine/egg-ark--survival-evolved.json +++ b/database/Seeders/eggs/source-engine/egg-ark--survival-evolved.json @@ -4,11 +4,13 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-09-11T14:35:10-04:00", + "exported_at": "2022-01-18T07:01:38-05:00", "name": "Ark: Survival Evolved", "author": "dev@shepper.fr", "description": "As a man or woman stranded, naked, freezing, and starving on the unforgiving shores of a mysterious island called ARK, use your skill and cunning to kill or tame and ride the plethora of leviathan dinosaurs and other primeval creatures roaming the land. Hunt, harvest resources, craft items, grow crops, research technologies, and build shelters to withstand the elements and store valuables, all while teaming up with (or preying upon) hundreds of other players to survive, dominate... and escape! \u2014 Gamepedia: ARK", - "features": null, + "features": [ + "steam_disk_space" + ], "images": [ "quay.io\/parkervcp\/pterodactyl-images:debian_source" ], @@ -22,8 +24,8 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n# Image to install with is 'ubuntu:18.04'\r\napt -y update\r\napt -y --no-install-recommends --no-install-suggests install curl lib32gcc1 ca-certificates\r\n\r\n## just in case someone removed the defaults.\r\nif [ \"${STEAM_USER}\" == \"\" ]; then\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\n\r\nmkdir -p \/mnt\/server\/Engine\/Binaries\/ThirdParty\/SteamCMD\/Linux\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/Engine\/Binaries\/ThirdParty\/SteamCMD\/Linux\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +force_install_dir \/mnt\/server +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so\r\n\r\n## create a symbolic link for loading mods\r\ncd \/mnt\/server\/Engine\/Binaries\/ThirdParty\/SteamCMD\/Linux\r\nln -sf ..\/..\/..\/..\/..\/Steam\/steamapps steamapps\r\ncd \/mnt\/server", - "container": "debian:buster-slim", + "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n# Image to install with is 'ubuntu:18.04'\r\n\r\n## just in case someone removed the defaults.\r\nif [ \"${STEAM_USER}\" == \"\" ]; then\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\n\r\nmkdir -p \/mnt\/server\/Engine\/Binaries\/ThirdParty\/SteamCMD\/Linux\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/Engine\/Binaries\/ThirdParty\/SteamCMD\/Linux\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so\r\n\r\n## create a symbolic link for loading mods\r\ncd \/mnt\/server\/Engine\/Binaries\/ThirdParty\/SteamCMD\/Linux\r\nln -sf ..\/..\/..\/..\/..\/Steam\/steamapps steamapps\r\ncd \/mnt\/server", + "container": "ghcr.io\/pterodactyl\/installers:debian", "entrypoint": "bash" } }, diff --git a/database/Seeders/eggs/source-engine/egg-counter--strike--global-offensive.json b/database/Seeders/eggs/source-engine/egg-counter--strike--global-offensive.json index 255c9934e..7c9a9779f 100644 --- a/database/Seeders/eggs/source-engine/egg-counter--strike--global-offensive.json +++ b/database/Seeders/eggs/source-engine/egg-counter--strike--global-offensive.json @@ -4,12 +4,13 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-09-10T14:36:37-04:00", + "exported_at": "2022-01-18T07:01:54-05:00", "name": "Counter-Strike: Global Offensive", "author": "support@pterodactyl.io", "description": "Counter-Strike: Global Offensive is a multiplayer first-person shooter video game developed by Hidden Path Entertainment and Valve Corporation.", "features": [ - "gsl_token" + "gsl_token", + "steam_disk_space" ], "images": [ "ghcr.io\/pterodactyl\/games:source" @@ -24,12 +25,13 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\n## just in case someone removed the defaults.\r\nif [ \"${STEAM_USER}\" == \"\" ]; then\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +force_install_dir \/mnt\/server +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so", + "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\n## just in case someone removed the defaults.\r\nif [ \"${STEAM_USER}\" == \"\" ]; then\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so", "container": "ghcr.io\/pterodactyl\/installers:debian", "entrypoint": "bash" } }, - "variables": [{ + "variables": [ + { "name": "Map", "description": "The default map for the server.", "env_variable": "SRCDS_MAP", diff --git a/database/Seeders/eggs/source-engine/egg-custom-source-engine-game.json b/database/Seeders/eggs/source-engine/egg-custom-source-engine-game.json index 53133a67b..6c93175f5 100644 --- a/database/Seeders/eggs/source-engine/egg-custom-source-engine-game.json +++ b/database/Seeders/eggs/source-engine/egg-custom-source-engine-game.json @@ -4,11 +4,13 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-09-10T14:36:22-04:00", + "exported_at": "2022-01-18T07:03:08-05:00", "name": "Custom Source Engine Game", "author": "support@pterodactyl.io", "description": "This option allows modifying the startup arguments and other details to run a custom SRCDS based game on the panel.", - "features": null, + "features": [ + "steam_disk_space" + ], "images": [ "ghcr.io\/pterodactyl\/games:source" ], @@ -22,12 +24,13 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\n##\r\n#\r\n# Variables\r\n# STEAM_USER, STEAM_PASS, STEAM_AUTH - Steam user setup. If a user has 2fa enabled it will most likely fail due to timeout. Leave blank for anon install.\r\n# WINDOWS_INSTALL - if it's a windows server you want to install set to 1\r\n# SRCDS_APPID - steam app id ffound here - https:\/\/developer.valvesoftware.com\/wiki\/Dedicated_Servers_List\r\n# EXTRA_FLAGS - when a server has extra glas for things like beta installs or updates.\r\n#\r\n##\r\n\r\n\r\n## just in case someone removed the defaults.\r\nif [ \"${STEAM_USER}\" == \"\" ]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +force_install_dir \/mnt\/server +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so", + "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\n##\r\n#\r\n# Variables\r\n# STEAM_USER, STEAM_PASS, STEAM_AUTH - Steam user setup. If a user has 2fa enabled it will most likely fail due to timeout. Leave blank for anon install.\r\n# WINDOWS_INSTALL - if it's a windows server you want to install set to 1\r\n# SRCDS_APPID - steam app id ffound here - https:\/\/developer.valvesoftware.com\/wiki\/Dedicated_Servers_List\r\n# EXTRA_FLAGS - when a server has extra glas for things like beta installs or updates.\r\n#\r\n##\r\n\r\n\r\n## just in case someone removed the defaults.\r\nif [ \"${STEAM_USER}\" == \"\" ]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so", "container": "ghcr.io\/pterodactyl\/installers:debian", "entrypoint": "bash" } }, - "variables": [{ + "variables": [ + { "name": "Game ID", "description": "The ID corresponding to the game to download and run using SRCDS.", "env_variable": "SRCDS_APPID", diff --git a/database/Seeders/eggs/source-engine/egg-garrys-mod.json b/database/Seeders/eggs/source-engine/egg-garrys-mod.json index f322507c6..82ec08fee 100644 --- a/database/Seeders/eggs/source-engine/egg-garrys-mod.json +++ b/database/Seeders/eggs/source-engine/egg-garrys-mod.json @@ -4,12 +4,13 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-12-04T18:47:10+00:00", + "exported_at": "2022-01-18T07:04:20-05:00", "name": "Garrys Mod", "author": "support@pterodactyl.io", "description": "Garrys Mod, is a sandbox physics game created by Garry Newman, and developed by his company, Facepunch Studios.", "features": [ - "gsl_token" + "gsl_token", + "steam_disk_space" ], "images": [ "ghcr.io\/pterodactyl\/games:source" @@ -24,7 +25,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\n## just in case someone removed the defaults.\r\nif [ \"${STEAM_USER}\" == \"\" ]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +force_install_dir \/mnt\/server +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so\r\n\r\n# Creating needed default files for the game\r\ncd \/mnt\/server\/garrysmod\/lua\/autorun\/server\r\necho '\r\n-- Docs: https:\/\/wiki.garrysmod.com\/page\/resource\/AddWorkshop\r\n-- Place the ID of the workshop addon you want to be downloaded to people who join your server, not the collection ID\r\n-- Use https:\/\/beta.configcreator.com\/create\/gmod\/resources.lua to easily create a list based on your collection ID\r\n\r\nresource.AddWorkshop( \"\" )\r\n' > workshop.lua\r\n\r\ncd \/mnt\/server\/garrysmod\/cfg\r\necho '\r\n\/\/ Please do not set RCon in here, use the startup parameters.\r\n\r\nhostname\t\t\"New Gmod Server\"\r\nsv_password\t\t\"\"\r\nsv_loadingurl \"\"\r\nsv_downloadurl \"\"\r\n\r\n\/\/ Steam Server List Settings\r\n\/\/ sv_location \"eu\"\r\nsv_region \"255\"\r\nsv_lan \"0\"\r\nsv_max_queries_sec_global \"30000\"\r\nsv_max_queries_window \"45\"\r\nsv_max_queries_sec \"5\"\r\n\r\n\/\/ Server Limits\r\nsbox_maxprops\t\t100\r\nsbox_maxragdolls\t5\r\nsbox_maxnpcs\t\t10\r\nsbox_maxballoons\t10\r\nsbox_maxeffects\t\t10\r\nsbox_maxdynamite\t10\r\nsbox_maxlamps\t\t10\r\nsbox_maxthrusters\t10\r\nsbox_maxwheels\t\t10\r\nsbox_maxhoverballs\t10\r\nsbox_maxvehicles\t20\r\nsbox_maxbuttons\t\t10\r\nsbox_maxsents\t\t20\r\nsbox_maxemitters\t5\r\nsbox_godmode\t\t0\r\nsbox_noclip\t\t 0\r\n\r\n\/\/ Network Settings - Please keep these set to default.\r\n\r\nsv_minrate\t\t75000\r\nsv_maxrate\t\t0\r\ngmod_physiterations\t2\r\nnet_splitpacket_maxrate\t45000\r\ndecalfrequency\t\t12 \r\n\r\n\/\/ Execute Ban Files - Please do not edit\r\nexec banned_ip.cfg \r\nexec banned_user.cfg \r\n\r\n\/\/ Add custom lines under here\r\n' > server.cfg", + "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\n## just in case someone removed the defaults.\r\nif [ \"${STEAM_USER}\" == \"\" ]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so\r\n\r\n# Creating needed default files for the game\r\ncd \/mnt\/server\/garrysmod\/lua\/autorun\/server\r\necho '\r\n-- Docs: https:\/\/wiki.garrysmod.com\/page\/resource\/AddWorkshop\r\n-- Place the ID of the workshop addon you want to be downloaded to people who join your server, not the collection ID\r\n-- Use https:\/\/beta.configcreator.com\/create\/gmod\/resources.lua to easily create a list based on your collection ID\r\n\r\nresource.AddWorkshop( \"\" )\r\n' > workshop.lua\r\n\r\ncd \/mnt\/server\/garrysmod\/cfg\r\necho '\r\n\/\/ Please do not set RCon in here, use the startup parameters.\r\n\r\nhostname\t\t\"New Gmod Server\"\r\nsv_password\t\t\"\"\r\nsv_loadingurl \"\"\r\nsv_downloadurl \"\"\r\n\r\n\/\/ Steam Server List Settings\r\n\/\/ sv_location \"eu\"\r\nsv_region \"255\"\r\nsv_lan \"0\"\r\nsv_max_queries_sec_global \"30000\"\r\nsv_max_queries_window \"45\"\r\nsv_max_queries_sec \"5\"\r\n\r\n\/\/ Server Limits\r\nsbox_maxprops\t\t100\r\nsbox_maxragdolls\t5\r\nsbox_maxnpcs\t\t10\r\nsbox_maxballoons\t10\r\nsbox_maxeffects\t\t10\r\nsbox_maxdynamite\t10\r\nsbox_maxlamps\t\t10\r\nsbox_maxthrusters\t10\r\nsbox_maxwheels\t\t10\r\nsbox_maxhoverballs\t10\r\nsbox_maxvehicles\t20\r\nsbox_maxbuttons\t\t10\r\nsbox_maxsents\t\t20\r\nsbox_maxemitters\t5\r\nsbox_godmode\t\t0\r\nsbox_noclip\t\t 0\r\n\r\n\/\/ Network Settings - Please keep these set to default.\r\n\r\nsv_minrate\t\t75000\r\nsv_maxrate\t\t0\r\ngmod_physiterations\t2\r\nnet_splitpacket_maxrate\t45000\r\ndecalfrequency\t\t12 \r\n\r\n\/\/ Execute Ban Files - Please do not edit\r\nexec banned_ip.cfg \r\nexec banned_user.cfg \r\n\r\n\/\/ Add custom lines under here\r\n' > server.cfg", "container": "ghcr.io\/pterodactyl\/installers:debian", "entrypoint": "bash" } @@ -103,4 +104,4 @@ "rules": "required|boolean" } ] -} \ No newline at end of file +} diff --git a/database/Seeders/eggs/source-engine/egg-insurgency.json b/database/Seeders/eggs/source-engine/egg-insurgency.json index eed4b9e40..69d182f3d 100644 --- a/database/Seeders/eggs/source-engine/egg-insurgency.json +++ b/database/Seeders/eggs/source-engine/egg-insurgency.json @@ -4,11 +4,13 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-06-06T10:34:11-04:00", + "exported_at": "2022-01-18T07:07:27-05:00", "name": "Insurgency", "author": "support@pterodactyl.io", "description": "Take to the streets for intense close quarters combat, where a team's survival depends upon securing crucial strongholds and destroying enemy supply in this multiplayer and cooperative Source Engine based experience.", - "features": null, + "features": [ + "steam_disk_space" + ], "images": [ "ghcr.io\/pterodactyl\/games:source" ], @@ -17,12 +19,12 @@ "config": { "files": "{}", "startup": "{\r\n \"done\": \"gameserver Steam ID\"\r\n}", - "logs": "{\r\n \"custom\": true,\r\n \"location\": \"logs\/latest.log\"\r\n}", + "logs": "{}", "stop": "quit" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +login anonymous +force_install_dir \/mnt\/server +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} +quit\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so", + "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login anonymous +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} +quit\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so", "container": "ghcr.io\/pterodactyl\/installers:debian", "entrypoint": "bash" } @@ -47,4 +49,4 @@ "rules": "required|regex:\/^(\\w{1,20})$\/" } ] -} \ No newline at end of file +} diff --git a/database/Seeders/eggs/source-engine/egg-team-fortress2.json b/database/Seeders/eggs/source-engine/egg-team-fortress2.json index c1bceaf89..476ec5675 100644 --- a/database/Seeders/eggs/source-engine/egg-team-fortress2.json +++ b/database/Seeders/eggs/source-engine/egg-team-fortress2.json @@ -4,11 +4,13 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2021-06-05T16:34:53-04:00", + "exported_at": "2022-01-18T07:06:24-05:00", "name": "Team Fortress 2", "author": "support@pterodactyl.io", "description": "Team Fortress 2 is a team-based first-person shooter multiplayer video game developed and published by Valve Corporation. It is the sequel to the 1996 mod Team Fortress for Quake and its 1999 remake.", - "features": null, + "features": [ + "steam_disk_space" + ], "images": [ "ghcr.io\/pterodactyl\/games:source" ], @@ -16,13 +18,13 @@ "startup": ".\/srcds_run -game tf -console -port {{SERVER_PORT}} +map {{SRCDS_MAP}} +ip 0.0.0.0 -strictportbind -norestart", "config": { "files": "{}", - "startup": "{\r\n \"done\": \"gameserver Steam ID\",\r\n \"userInteraction\": []\r\n}", - "logs": "{\r\n \"custom\": true,\r\n \"location\": \"logs\/latest.log\"\r\n}", + "startup": "{\r\n \"done\": \"gameserver Steam ID\"\r\n}", + "logs": "{}", "stop": "quit" }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n# Image to install with is 'debian:buster-slim'\r\n\r\n##\r\n#\r\n# Variables\r\n# STEAM_USER, STEAM_PASS, STEAM_AUTH - Steam user setup. If a user has 2fa enabled it will most likely fail due to timeout. Leave blank for anon install.\r\n# WINDOWS_INSTALL - if it's a windows server you want to install set to 1\r\n# SRCDS_APPID - steam app id ffound here - https:\/\/developer.valvesoftware.com\/wiki\/Dedicated_Servers_List\r\n# EXTRA_FLAGS - when a server has extra glas for things like beta installs or updates.\r\n#\r\n##\r\n\r\napt -y update\r\napt -y --no-install-recommends install curl lib32gcc1 ca-certificates\r\n\r\n## just in case someone removed the defaults.\r\nif [ \"${STEAM_USER}\" == \"\" ]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +force_install_dir \/mnt\/server +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so", + "script": "#!\/bin\/bash\r\n# steamcmd Base Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n# Image to install with is 'debian:buster-slim'\r\n\r\n##\r\n#\r\n# Variables\r\n# STEAM_USER, STEAM_PASS, STEAM_AUTH - Steam user setup. If a user has 2fa enabled it will most likely fail due to timeout. Leave blank for anon install.\r\n# WINDOWS_INSTALL - if it's a windows server you want to install set to 1\r\n# SRCDS_APPID - steam app id ffound here - https:\/\/developer.valvesoftware.com\/wiki\/Dedicated_Servers_List\r\n# EXTRA_FLAGS - when a server has extra glas for things like beta installs or updates.\r\n#\r\n##\r\n\r\n## just in case someone removed the defaults.\r\nif [ \"${STEAM_USER}\" == \"\" ]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\nmkdir -p \/mnt\/server\/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd \/mnt\/server\/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n## install game using steamcmd\r\n.\/steamcmd.sh +force_install_dir \/mnt\/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} ${EXTRA_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6\r\n\r\n## set up 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so", "container": "ghcr.io\/pterodactyl\/installers:debian", "entrypoint": "bash" } diff --git a/resources/scripts/components/server/ServerConsole.tsx b/resources/scripts/components/server/ServerConsole.tsx index 276a64a38..bc36dd33c 100644 --- a/resources/scripts/components/server/ServerConsole.tsx +++ b/resources/scripts/components/server/ServerConsole.tsx @@ -7,7 +7,7 @@ import ServerContentBlock from '@/components/elements/ServerContentBlock'; import ServerDetailsBlock from '@/components/server/ServerDetailsBlock'; import isEqual from 'react-fast-compare'; import PowerControls from '@/components/server/PowerControls'; -import { EulaModalFeature, JavaVersionModalFeature, GSLTokenModalFeature, PIDLimitModalFeature } from '@feature/index'; +import { EulaModalFeature, JavaVersionModalFeature, GSLTokenModalFeature, PIDLimitModalFeature, SteamDiskSpaceFeature } from '@feature/index'; import ErrorBoundary from '@/components/elements/ErrorBoundary'; import Spinner from '@/components/elements/Spinner'; @@ -62,6 +62,7 @@ const ServerConsole = () => { {eggFeatures.includes('java_version') && } {eggFeatures.includes('gsl_token') && } {eggFeatures.includes('pid_limit') && } + {eggFeatures.includes('steam_disk_space') && } diff --git a/resources/scripts/components/server/features/SteamDiskSpaceFeature.tsx b/resources/scripts/components/server/features/SteamDiskSpaceFeature.tsx new file mode 100644 index 000000000..2694c9815 --- /dev/null +++ b/resources/scripts/components/server/features/SteamDiskSpaceFeature.tsx @@ -0,0 +1,78 @@ +import React, { useEffect, useState } from 'react'; +import { ServerContext } from '@/state/server'; +import Modal from '@/components/elements/Modal'; +import tw from 'twin.macro'; +import Button from '@/components/elements/Button'; +import FlashMessageRender from '@/components/FlashMessageRender'; +import useFlash from '@/plugins/useFlash'; +import { SocketEvent } from '@/components/server/events'; +import { useStoreState } from 'easy-peasy'; + +const SteamDiskSpaceFeature = () => { + const [ visible, setVisible ] = useState(false); + const [ loading ] = useState(false); + + const status = ServerContext.useStoreState(state => state.status.value); + const { clearFlashes } = useFlash(); + const { connected, instance } = ServerContext.useStoreState(state => state.socket); + const isAdmin = useStoreState(state => state.user.data!.rootAdmin); + + useEffect(() => { + if (!connected || !instance || status === 'running') return; + + const errors = [ + 'steamcmd needs 250mb of free disk space to update', + '0x202 after update job', + ]; + + const listener = (line: string) => { + if (errors.some(p => line.toLowerCase().includes(p))) { + setVisible(true); + } + }; + + instance.addListener(SocketEvent.CONSOLE_OUTPUT, listener); + + return () => { + instance.removeListener(SocketEvent.CONSOLE_OUTPUT, listener); + }; + }, [ connected, instance, status ]); + + useEffect(() => { + clearFlashes('feature:steamDiskSpace'); + }, []); + + return ( + setVisible(false)} closeOnBackground={false} showSpinnerOverlay={loading}> + + {isAdmin ? + <> +
+

Out of available disk space...

+
+

This server has run out of available disk space and cannot complete the install or update process.

+

Ensure the machine has enough disk space by typing df -h on the machine hosting this server. Delete files or increase the available disk space to resolve the issue.

+
+ +
+ + : + <> +
+

Out of available disk space...

+
+

This server has run out of available disk space and cannot complete the install or update process. Please get in touch with the administrator(s) and inform them of disk space issues.

+
+ +
+ + } +
+ ); +}; + +export default SteamDiskSpaceFeature; diff --git a/resources/scripts/components/server/features/index.ts b/resources/scripts/components/server/features/index.ts index 087e329dc..6dcba53e6 100644 --- a/resources/scripts/components/server/features/index.ts +++ b/resources/scripts/components/server/features/index.ts @@ -10,5 +10,6 @@ const EulaModalFeature = lazy(() => import(/* webpackChunkName: "feature.eula" * const JavaVersionModalFeature = lazy(() => import(/* webpackChunkName: "feature.java_version" */'@feature/JavaVersionModalFeature')); const GSLTokenModalFeature = lazy(() => import(/* webpackChunkName: "feature.gsl_token" */'@feature/GSLTokenModalFeature')); const PIDLimitModalFeature = lazy(() => import(/* webpackChunkName: "feature.pid_limit" */'@feature/PIDLimitModalFeature')); +const SteamDiskSpaceFeature = lazy(() => import(/* webpackChunkName: "feature.steam_disk_space" */'@feature/SteamDiskSpaceFeature')); -export { EulaModalFeature, JavaVersionModalFeature, GSLTokenModalFeature, PIDLimitModalFeature }; +export { EulaModalFeature, JavaVersionModalFeature, GSLTokenModalFeature, PIDLimitModalFeature, SteamDiskSpaceFeature }; From ee870d45e8fc4872c9a77ef9f0a2abf305b0c1ca Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 19 Jan 2022 19:55:33 -0500 Subject: [PATCH 04/17] Update CHANGELOG.md --- CHANGELOG.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35d87529b..eabeb8061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,31 @@ This file is a running track of new features and fixes to each version of the pa This project follows [Semantic Versioning](http://semver.org) guidelines. +## v1.7.0 +### Fixed +* Fixes typo in message shown to user when deleting a database. +* Fixes formatting of IPv6 addresses when displaying allocations to users. +* Fixes an exception thrown while trying to return error messages from API endpoints that inproperly masked the true underlying error. +* Fixes SSL certificate path generation for Let's Encrypt by ensuring they are always transformed to lowercase. +* Removes duplicate entries when creating a nested folder in the file manager. +* Fixes missing validation of Egg Author email addresses during the setup process that could cause unexpected failures later on. +* Fixes font rendering issues of the console on Firefox due to an outdated version of xterm.js being used. +* Fixes display overlap issues of the two-factor configuration form in a user's settings. + +### Changed +* CPU graph changed to show the maximum amount of CPU available to a server to better match how the memory graph is displayed. + +### Added +* Adds support for `DB_PORT` environment variable in the Docker enterpoint for the Panel image. +* Adds suport for ARM environments in the Docker image. +* Adds a new warning modal for Steam servers shown when an invalid Game Server Login Token (GSL Token) is detected. +* Adds a new warning modal for Steam servers shown when the installation process runs out of available disk space. +* Adds a new warning modal for Minecraft servers shown when a server exceeds the maximum number of child processes. +* Adds support for displaying certain server variable fields as a checkbox when they're detected as using `boolean` or `in:0,1` validation rules. +* Adds support for Pug and Jade in the file editor. +* Adds an entry to the `robots.txt` file to correctly disallow all bot indexing. + + ## v1.6.6 ### Fixed * **[security]** Fixes a CSRF vulnerability for both the administrative test email endpoint and node auto-deployment token generation endpoint. [GHSA-wwgq-9jhf-qgw6](https://github.com/pterodactyl/panel/security/advisories/GHSA-wwgq-9jhf-qgw6) From 21f74a835cb8bf64a6b60be859ed5af9bfda27cf Mon Sep 17 00:00:00 2001 From: Mrxbox98 <29240392+mrxbox98@users.noreply.github.com> Date: Wed, 19 Jan 2022 17:06:31 -0800 Subject: [PATCH 05/17] Fixed error (#3870) --- resources/views/admin/servers/view/build.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/admin/servers/view/build.blade.php b/resources/views/admin/servers/view/build.blade.php index 36044ba22..8add287be 100644 --- a/resources/views/admin/servers/view/build.blade.php +++ b/resources/views/admin/servers/view/build.blade.php @@ -35,7 +35,7 @@ % -

Each physical core on the system is considered to be 100%. Setting this value to 0 will allow a server to use CPU time without restrictions.

+

Each virtual core (thread) on the system is considered to be 100%. Setting this value to 0 will allow a server to use CPU time without restrictions.

From dfa329ddf242908b60e22e3340ea36359eab1ef4 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 19 Jan 2022 21:09:17 -0500 Subject: [PATCH 06/17] [security] ensure session is only for that request when authenticating user API key https://github.com/pterodactyl/panel/security/advisories/GHSA-7v3x-h7r2-34jv --- CHANGELOG.md | 1 + app/Http/Middleware/Api/AuthenticateKey.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eabeb8061..78a403449 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * Fixes missing validation of Egg Author email addresses during the setup process that could cause unexpected failures later on. * Fixes font rendering issues of the console on Firefox due to an outdated version of xterm.js being used. * Fixes display overlap issues of the two-factor configuration form in a user's settings. +* **[security]** When authenticating using an API key a user session is now only persisted for the duration of the request before being destroyed. ### Changed * CPU graph changed to show the maximum amount of CPU available to a server to better match how the memory graph is displayed. diff --git a/app/Http/Middleware/Api/AuthenticateKey.php b/app/Http/Middleware/Api/AuthenticateKey.php index eb25dac6f..857bfab29 100644 --- a/app/Http/Middleware/Api/AuthenticateKey.php +++ b/app/Http/Middleware/Api/AuthenticateKey.php @@ -70,7 +70,7 @@ class AuthenticateKey } else { $model = $this->authenticateApiKey($request->bearerToken(), $keyType); - $this->auth->guard()->loginUsingId($model->user_id); + $this->auth->guard()->onceUsingId($model->user_id); } $request->attributes->set('api_key', $model); From 60b82343b2c75abf191f1323db1a19a8eabe19f7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 19 Jan 2022 18:10:51 -0800 Subject: [PATCH 07/17] Update SECURITY.md --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index 171a0cb13..673a38ee3 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -5,7 +5,7 @@ The following versions of Pterodactyl are receiving active support and maintenan | Panel | Daemon | Supported | | ----- | ------------ | ------------------ | -| 1.6.x | wings@1.5.x | :white_check_mark: | +| 1.7.x | wings@1.5.x | :white_check_mark: | | 0.7.x | daemon@0.6.x | :x: | From 0a4ba6a7dc19fc77e3b9e4853b67e6aadb580755 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 23 Jan 2022 12:58:44 -0500 Subject: [PATCH 08/17] Force https on URLs when behind proxy; closes #3623 --- app/Providers/AppServiceProvider.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 11baa730b..4ccc78641 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -4,9 +4,11 @@ namespace Pterodactyl\Providers; use View; use Cache; +use Illuminate\Support\Str; use Pterodactyl\Models\User; use Pterodactyl\Models\Server; use Pterodactyl\Models\Subuser; +use Illuminate\Support\Facades\URL; use Illuminate\Pagination\Paginator; use Illuminate\Support\Facades\Schema; use Illuminate\Support\ServiceProvider; @@ -32,6 +34,15 @@ class AppServiceProvider extends ServiceProvider View::share('appIsGit', $this->versionData()['is_git'] ?? false); Paginator::useBootstrap(); + + // If the APP_URL value is set with https:// make sure we force it here. Theoretically + // this should just work with the proxy logic, but there are a lot of cases where it + // doesn't, and it triggers a lot of support requests, so lets just head it off here. + // + // @see https://github.com/pterodactyl/panel/issues/3623 + if (Str::startsWith(config('app.url') ?? '', 'https://')) { + URL::forceScheme('https'); + } } /** From 7866c190075914b529e69d4f419a3bde3592575c Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 28 Jan 2022 18:32:33 +0200 Subject: [PATCH 09/17] feat(docker): automated certificate renewal with certbot (#3916) * feat(docker): automated certificate renewal with certbot Executes cron on the first day of every month at 23:00 to reduce the load on LE when everyone else is doing it at 00. Certificate that expires in less than 30 days will be renewed. closes #3907 --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 73f79bf86..2c743cab2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ FROM --platform=$TARGETOS/$TARGETARCH php:7.4-fpm-alpine WORKDIR /app COPY . ./ COPY --from=0 /app/public/assets ./public/assets -RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar unzip nginx libpng-dev libxml2-dev libzip-dev certbot \ +RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar unzip nginx libpng-dev libxml2-dev libzip-dev certbot certbot-nginx \ && docker-php-ext-configure zip \ && docker-php-ext-install bcmath gd pdo_mysql zip \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ @@ -27,6 +27,7 @@ RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar un RUN rm /usr/local/etc/php-fpm.conf \ && echo "* * * * * /usr/local/bin/php /app/artisan schedule:run >> /dev/null 2>&1" >> /var/spool/cron/crontabs/root \ + && echo "0 23 * * * certbot renew --nginx --quiet" >> /var/spool/cron/crontabs/root \ && sed -i s/ssl_session_cache/#ssl_session_cache/g /etc/nginx/nginx.conf \ && mkdir -p /var/run/php /var/run/nginx @@ -35,5 +36,5 @@ COPY .github/docker/www.conf /usr/local/etc/php-fpm.conf COPY .github/docker/supervisord.conf /etc/supervisord.conf EXPOSE 80 443 -ENTRYPOINT ["/bin/ash", ".github/docker/entrypoint.sh"] +ENTRYPOINT [ "/bin/ash", ".github/docker/entrypoint.sh" ] CMD [ "supervisord", "-n", "-c", "/etc/supervisord.conf" ] From 8dee69e78f6d0a1c483907b8d8d2826785ef539f Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 30 Jan 2022 09:04:54 -0800 Subject: [PATCH 10/17] Add fields for game and image details --- .github/ISSUE_TEMPLATE/bug-report.yml | 36 ++++++++++++++++++++------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index b2a9113ac..adf3d2738 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -7,14 +7,6 @@ body: value: | Bug reports should only be used for reporting issues with how the software works. For assistance installing this software, as well as debugging issues with dependencies, please use our [Discord server](https://discord.gg/pterodactyl). -- type: checkboxes - attributes: - label: Is there an existing issue for this? - description: Please [search here](https://github.com/pterodactyl/panel/issues) to see if an issue already exists for your problem. - options: - - label: I have searched the existing issues before opening this issue. - required: true - - type: textarea attributes: label: Current Behavior @@ -32,7 +24,7 @@ body: - type: textarea attributes: label: Steps to Reproduce - description: Please be as detailed as possible when providing steps to reproduce, failure to provide steps will likely result in this issue being closed. + description: Please be as detailed as possible when providing steps to reproduce, failure to provide steps will result in this issue being closed. validations: required: true @@ -53,6 +45,20 @@ body: placeholder: 1.4.2 validations: required: true + +- type: input + id: egg-details + attributes: + label: Games and/or Eggs Affected + description: Please include the specific game(s) or egg(s) you are running into this bug with. + placeholder: Minecraft (Paper), Minecraft (Forge) + +- type: input + id: docker-image + attributes: + label: Docker Image + description: The specific Docker image you are using for the game(s) above. + placeholder: ghcr.io/pterodactyl/yolks:java_17 - type: textarea id: panel-logs @@ -67,3 +73,15 @@ body: render: bash validations: required: false + +- type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please [search here](https://github.com/pterodactyl/panel/issues) to see if an issue already exists for your problem. + options: + - label: I have searched the existing issues before opening this issue. + required: true + - label: I have provided all relevant details, including the specific game and Docker images I am using if this issue is related to running a server. + required: true + - label: I have checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system. + required: true From 05bdffcd61f66292ddd16d8f16eeb03605a362c9 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 5 Feb 2022 19:05:18 +0200 Subject: [PATCH 11/17] ref: set redis as default option for env drivers setup (#3915) Redis is the recommended value yet the default options are different, e.g cache being file. --- config/cache.php | 2 +- config/queue.php | 2 +- config/session.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/cache.php b/config/cache.php index 056522262..27276c200 100644 --- a/config/cache.php +++ b/config/cache.php @@ -14,7 +14,7 @@ return [ | */ - 'default' => env('CACHE_DRIVER', 'file'), + 'default' => env('CACHE_DRIVER', 'redis'), /* |-------------------------------------------------------------------------- diff --git a/config/queue.php b/config/queue.php index 326a575dd..02588bb3e 100644 --- a/config/queue.php +++ b/config/queue.php @@ -14,7 +14,7 @@ return [ | */ - 'default' => env('QUEUE_CONNECTION', env('QUEUE_DRIVER', 'database')), + 'default' => env('QUEUE_CONNECTION', env('QUEUE_DRIVER', 'redis')), /* |-------------------------------------------------------------------------- diff --git a/config/session.php b/config/session.php index 9d99eaf80..058528e5f 100644 --- a/config/session.php +++ b/config/session.php @@ -14,7 +14,7 @@ return [ | */ - 'driver' => env('SESSION_DRIVER', 'database'), + 'driver' => env('SESSION_DRIVER', 'redis'), /* |-------------------------------------------------------------------------- From edfd97e0b453b004b90d9477fdc7390559d8df48 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 5 Feb 2022 19:05:36 +0200 Subject: [PATCH 12/17] feat(pid_limit): expand list of errors for pid_limit feature (#3942) Expands the list of errors for pid_limit egg feature to support Steam PID errors and re-organize the list to be prettier --- .../components/server/features/PIDLimitModalFeature.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/scripts/components/server/features/PIDLimitModalFeature.tsx b/resources/scripts/components/server/features/PIDLimitModalFeature.tsx index 0c01533bc..9d0a57eb6 100644 --- a/resources/scripts/components/server/features/PIDLimitModalFeature.tsx +++ b/resources/scripts/components/server/features/PIDLimitModalFeature.tsx @@ -24,9 +24,11 @@ const PIDLimitModalFeature = () => { const errors = [ 'pthread_create failed', - 'exception in thread "craft async scheduler management thread"', - 'unable to create new native thread', + 'failed to create thread', + 'unable to create thread', 'unable to create native thread', + 'unable to create new native thread', + 'exception in thread "craft async scheduler management thread"', ]; const listener = (line: string) => { From 5c229d60e3d64b0c5b8d1441b078a739e0c731fc Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 5 Feb 2022 19:05:47 +0200 Subject: [PATCH 13/17] feat(tf2): add GSLT variable (#3927) Add GSLT variable similar to CS:GO. --- .../eggs/source-engine/egg-team-fortress2.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/database/Seeders/eggs/source-engine/egg-team-fortress2.json b/database/Seeders/eggs/source-engine/egg-team-fortress2.json index 476ec5675..6785984ed 100644 --- a/database/Seeders/eggs/source-engine/egg-team-fortress2.json +++ b/database/Seeders/eggs/source-engine/egg-team-fortress2.json @@ -4,18 +4,19 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2022-01-18T07:06:24-05:00", + "exported_at": "2022-01-30T14:09:22-05:00", "name": "Team Fortress 2", "author": "support@pterodactyl.io", "description": "Team Fortress 2 is a team-based first-person shooter multiplayer video game developed and published by Valve Corporation. It is the sequel to the 1996 mod Team Fortress for Quake and its 1999 remake.", "features": [ + "gsl_token", "steam_disk_space" ], "images": [ "ghcr.io\/pterodactyl\/games:source" ], "file_denylist": [], - "startup": ".\/srcds_run -game tf -console -port {{SERVER_PORT}} +map {{SRCDS_MAP}} +ip 0.0.0.0 -strictportbind -norestart", + "startup": ".\/srcds_run -game tf -console -port {{SERVER_PORT}} +map {{SRCDS_MAP}} +ip 0.0.0.0 -strictportbind -norestart +sv_setsteamaccount {{STEAM_ACC}}", "config": { "files": "{}", "startup": "{\r\n \"done\": \"gameserver Steam ID\"\r\n}", @@ -47,6 +48,15 @@ "user_viewable": true, "user_editable": true, "rules": "required|regex:\/^(\\w{1,20})$\/" + }, + { + "name": "Steam", + "description": "The Steam Game Server Login Token to display servers publicly. Generate one at https:\/\/steamcommunity.com\/dev\/managegameservers", + "env_variable": "STEAM_ACC", + "default_value": "", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|alpha_num|size:32" } ] } From 0ff60d83eb91af8717a954e7d5ed5f9d3141120d Mon Sep 17 00:00:00 2001 From: Mrxbox98 <29240392+mrxbox98@users.noreply.github.com> Date: Sat, 5 Feb 2022 09:08:11 -0800 Subject: [PATCH 14/17] Fix incorrect alignment on 2FA boxes due to incorrect TW breakpoints (#3914) --- .../dashboard/AccountOverviewContainer.tsx | 28 ++++++++++--------- resources/scripts/theme.ts | 6 ++-- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/resources/scripts/components/dashboard/AccountOverviewContainer.tsx b/resources/scripts/components/dashboard/AccountOverviewContainer.tsx index 6826955fb..646f7690e 100644 --- a/resources/scripts/components/dashboard/AccountOverviewContainer.tsx +++ b/resources/scripts/components/dashboard/AccountOverviewContainer.tsx @@ -11,19 +11,19 @@ import MessageBox from '@/components/MessageBox'; import { useLocation } from 'react-router-dom'; const Container = styled.div` - ${tw`flex flex-wrap`}; + ${tw`flex flex-wrap`}; - & > div { - ${tw`w-full`}; + & > div { + ${tw`w-full`}; - ${breakpoint('md')` - width: calc(50% - 1rem); - `} + ${breakpoint('sm')` + width: calc(50% - 1rem); + `} - ${breakpoint('xl')` - ${tw`w-auto flex-1`}; - `} - } + ${breakpoint('md')` + ${tw`w-auto flex-1`}; + `} + } `; export default () => { @@ -36,21 +36,23 @@ export default () => { Your account must have two-factor authentication enabled in order to continue. } - + + - + + ); }; diff --git a/resources/scripts/theme.ts b/resources/scripts/theme.ts index 9dd0b467d..8679ebaa7 100644 --- a/resources/scripts/theme.ts +++ b/resources/scripts/theme.ts @@ -3,8 +3,8 @@ import { BreakpointFunction, createBreakpoint } from 'styled-components-breakpoi type Breakpoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; export const breakpoint: BreakpointFunction = createBreakpoint({ xs: 0, - sm: 576, + sm: 640, md: 768, - lg: 992, - xl: 1200, + lg: 1024, + xl: 1280, }); From 5120590e47fba02213be2a540e4e5cb8bc1dd048 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 5 Feb 2022 19:08:43 +0200 Subject: [PATCH 15/17] ref: remove google analytics (#3912) --- .../Settings/BaseSettingsFormRequest.php | 2 -- app/Http/ViewComposers/AssetComposer.php | 1 - app/Providers/SettingsServiceProvider.php | 1 - ...022_01_25_030847_drop_google_analytics.php | 31 +++++++++++++++++++ package.json | 1 - resources/scripts/components/App.tsx | 22 ++----------- resources/scripts/state/settings.ts | 1 - .../views/admin/settings/index.blade.php | 7 ----- yarn.lock | 5 --- 9 files changed, 33 insertions(+), 38 deletions(-) create mode 100644 database/migrations/2022_01_25_030847_drop_google_analytics.php diff --git a/app/Http/Requests/Admin/Settings/BaseSettingsFormRequest.php b/app/Http/Requests/Admin/Settings/BaseSettingsFormRequest.php index 208c15b10..05d0f9d48 100644 --- a/app/Http/Requests/Admin/Settings/BaseSettingsFormRequest.php +++ b/app/Http/Requests/Admin/Settings/BaseSettingsFormRequest.php @@ -19,7 +19,6 @@ class BaseSettingsFormRequest extends AdminFormRequest 'app:name' => 'required|string|max:191', 'pterodactyl:auth:2fa_required' => 'required|integer|in:0,1,2', 'app:locale' => ['required', 'string', Rule::in(array_keys($this->getAvailableLanguages()))], - 'app:analytics' => 'nullable|string', ]; } @@ -32,7 +31,6 @@ class BaseSettingsFormRequest extends AdminFormRequest 'app:name' => 'Company Name', 'pterodactyl:auth:2fa_required' => 'Require 2-Factor Authentication', 'app:locale' => 'Default Language', - 'app:analytics' => 'Google Analytics', ]; } } diff --git a/app/Http/ViewComposers/AssetComposer.php b/app/Http/ViewComposers/AssetComposer.php index 32ec9fb88..902c237b7 100644 --- a/app/Http/ViewComposers/AssetComposer.php +++ b/app/Http/ViewComposers/AssetComposer.php @@ -33,7 +33,6 @@ class AssetComposer 'enabled' => config('recaptcha.enabled', false), 'siteKey' => config('recaptcha.website_key') ?? '', ], - 'analytics' => config('app.analytics') ?? '', ]); } } diff --git a/app/Providers/SettingsServiceProvider.php b/app/Providers/SettingsServiceProvider.php index 71fda215e..447ac3db1 100644 --- a/app/Providers/SettingsServiceProvider.php +++ b/app/Providers/SettingsServiceProvider.php @@ -21,7 +21,6 @@ class SettingsServiceProvider extends ServiceProvider protected $keys = [ 'app:name', 'app:locale', - 'app:analytics', 'recaptcha:enabled', 'recaptcha:secret_key', 'recaptcha:website_key', diff --git a/database/migrations/2022_01_25_030847_drop_google_analytics.php b/database/migrations/2022_01_25_030847_drop_google_analytics.php new file mode 100644 index 000000000..5daf0bc39 --- /dev/null +++ b/database/migrations/2022_01_25_030847_drop_google_analytics.php @@ -0,0 +1,31 @@ +where('key', 'settings::app:analytics')->delete(); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + DB::table('settings')->insert( + [ + 'key' => 'settings::app:analytics', + ] + ); + } +} diff --git a/package.json b/package.json index 1a4414095..77db3475d 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "react-copy-to-clipboard": "^5.0.2", "react-dom": "npm:@hot-loader/react-dom", "react-fast-compare": "^3.2.0", - "react-ga": "^3.1.2", "react-google-recaptcha": "^2.0.1", "react-hot-loader": "^4.12.21", "react-i18next": "^11.2.1", diff --git a/resources/scripts/components/App.tsx b/resources/scripts/components/App.tsx index d733538b0..1746fb6bf 100644 --- a/resources/scripts/components/App.tsx +++ b/resources/scripts/components/App.tsx @@ -1,7 +1,6 @@ -import React, { useEffect } from 'react'; -import ReactGA from 'react-ga'; +import React from 'react'; import { hot } from 'react-hot-loader/root'; -import { Route, Router, Switch, useLocation } from 'react-router-dom'; +import { Route, Router, Switch } from 'react-router-dom'; import { StoreProvider } from 'easy-peasy'; import { store } from '@/state'; import DashboardRouter from '@/routers/DashboardRouter'; @@ -33,16 +32,6 @@ interface ExtendedWindow extends Window { setupInterceptors(history); -const Pageview = () => { - const { pathname } = useLocation(); - - useEffect(() => { - ReactGA.pageview(pathname); - }, [ pathname ]); - - return null; -}; - const App = () => { const { PterodactylUser, SiteConfiguration } = (window as ExtendedWindow); if (PterodactylUser && !store.getState().user.data) { @@ -62,12 +51,6 @@ const App = () => { store.getActions().settings.setSettings(SiteConfiguration!); } - useEffect(() => { - if (SiteConfiguration?.analytics) { - ReactGA.initialize(SiteConfiguration!.analytics); - } - }, []); - return ( <> @@ -76,7 +59,6 @@ const App = () => {
- {SiteConfiguration?.analytics && } diff --git a/resources/scripts/state/settings.ts b/resources/scripts/state/settings.ts index 3eb782d91..20dbbdc6e 100644 --- a/resources/scripts/state/settings.ts +++ b/resources/scripts/state/settings.ts @@ -7,7 +7,6 @@ export interface SiteSettings { enabled: boolean; siteKey: string; }; - analytics: string; } export interface SettingsStore { diff --git a/resources/views/admin/settings/index.blade.php b/resources/views/admin/settings/index.blade.php index 5ccec0dfa..489646dc9 100644 --- a/resources/views/admin/settings/index.blade.php +++ b/resources/views/admin/settings/index.blade.php @@ -31,13 +31,6 @@

This is the name that is used throughout the panel and in emails sent to clients.

-
- -
- -

This is your Google Analytics Tracking ID, Ex. UA-123723645-2

-
-
diff --git a/yarn.lock b/yarn.lock index 39d42755a..9c67ff246 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6221,11 +6221,6 @@ react-fast-compare@^3.2.0: resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb" integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA== -react-ga@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/react-ga/-/react-ga-3.1.2.tgz#e13f211c51a2e5c401ea69cf094b9501fe3c51ce" - integrity sha512-OJrMqaHEHbodm+XsnjA6ISBEHTwvpFrxco65mctzl/v3CASMSLSyUkFqz9yYrPDKGBUfNQzKCjuMJwctjlWBbw== - react-google-recaptcha@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/react-google-recaptcha/-/react-google-recaptcha-2.0.1.tgz#3276b29659493f7ca2a5b7739f6c239293cdf1d8" From 0bd182c2a7dfbec0c4d146a586729aef8bfd770c Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 5 Feb 2022 12:33:52 -0500 Subject: [PATCH 16/17] Lower the default guzzle timeouts; ref pterodactyl/panel#3936 --- config/pterodactyl.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/pterodactyl.php b/config/pterodactyl.php index b7cd12559..e21d1859f 100644 --- a/config/pterodactyl.php +++ b/config/pterodactyl.php @@ -84,8 +84,8 @@ return [ | Configure the timeout to be used for Guzzle connections here. */ 'guzzle' => [ - 'timeout' => env('GUZZLE_TIMEOUT', 30), - 'connect_timeout' => env('GUZZLE_CONNECT_TIMEOUT', 10), + 'timeout' => env('GUZZLE_TIMEOUT', 15), + 'connect_timeout' => env('GUZZLE_CONNECT_TIMEOUT', 5), ], /* From a071676be4e8a5d52d300eb9204f4f933bf62c7d Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 12 Feb 2022 13:18:08 -0500 Subject: [PATCH 17/17] Update webpack HMR for new dev environment --- package.json | 2 +- webpack.config.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 77db3475d..1f3df5673 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "watch": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --watch --progress", "build": "cross-env NODE_ENV=development ./node_modules/.bin/webpack --progress", "build:production": "yarn run clean && cross-env NODE_ENV=production ./node_modules/.bin/webpack --mode production", - "serve": "yarn run clean && cross-env PUBLIC_PATH=https://pterodactyl.test:8080 NODE_ENV=development webpack-dev-server --host 0.0.0.0 --hot --https --key /etc/ssl/private/pterodactyl.test-key.pem --cert /etc/ssl/private/pterodactyl.test.pem" + "serve": "yarn run clean && cross-env WEBPACK_PUBLIC_PATH=/webpack@hmr/ NODE_ENV=development webpack-dev-server --host 0.0.0.0 --port 8080 --public https://pterodactyl.test --hot" }, "browserslist": [ "> 0.5%", diff --git a/webpack.config.js b/webpack.config.js index c97abdd19..777b0be1b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -19,7 +19,7 @@ module.exports = { path: path.join(__dirname, '/public/assets'), filename: isProduction ? 'bundle.[chunkhash:8].js' : 'bundle.[hash:8].js', chunkFilename: isProduction ? '[name].[chunkhash:8].js' : '[name].[hash:8].js', - publicPath: (process.env.PUBLIC_PATH || '') + '/assets/', + publicPath: (process.env.WEBPACK_PUBLIC_PATH || '/assets/'), crossOriginLoading: 'anonymous', }, module: { @@ -115,7 +115,7 @@ module.exports = { devServer: { compress: true, contentBase: path.join(__dirname, '/public'), - publicPath: (process.env.PUBLIC_PATH || '') + '/assets/', + publicPath: process.env.WEBPACK_PUBLIC_PATH || '/assets/', allowedHosts: [ '.pterodactyl.test', ],