Files
2024-12-24 10:33:18 +01:00

88 lines
3.7 KiB
Plaintext

Hey thanks for your download
1.0 - In resources/scripts/components/server/console/Console.tsx (resources/scripts/components/server/Console.tsx on panel under 1.9 version) after all import line add :
const settings = {
prefix: '\x1B[33m\x1B[1m[CHANGE ME]:\x1B[39m',
diskusagecheck: 'Checking server disk space usage, this could take a few seconds...',
processconfiguration: 'Updating process configuration files...',
permcheck: 'Ensuring file permissions are set correctly, this could take a few seconds...',
dockerpull: 'Pulling Docker container image, this could take a few minutes to complete...',
finishpull: 'Finished pulling Docker container image',
};
const powersettings = {
starting : 'Server marked as starting',
started : 'Server marked as started',
offline : 'Server marked as offline',
}
const customsettings = {
'Starting minecraft server version': 'CHANGE ME OR REMOVE ME',
};
1.1 - In same file replace " const TERMINAL_PRELUDE = '\u001b[1m\u001b[33mcontainer@pterodactyl~ \u001b[0m';" by:
const TERMINAL_PRELUDE = settings.prefix;
1.2 - In same file replace " const handleConsoleOutput = (line: string, prelude = false) =>
terminal.writeln((prelude ? TERMINAL_PRELUDE : '') + line.replace(/(?:\r\n|\r|\n)$/im, '') + '\u001b[0m');
"
by :
const handleConsoleOutput = (line: string, prelude = false) => {
Object.keys(customsettings).map((element) => {
line = line.replace(element, customsettings[element as keyof typeof customsettings]);
});
terminal.writeln(
(prelude ? TERMINAL_PRELUDE : '') +
line
.replace('\x1B[1m\x1B[33mcontainer@pterodactyl~ \x1B[0m', TERMINAL_PRELUDE)
.replace('\x1B[33m\x1B[1m[Pterodactyl Daemon]:\x1B[39m', TERMINAL_PRELUDE)
.replace('Checking server disk space usage, this could take a few seconds...', settings.diskusagecheck)
.replace('Updating process configuration files...', settings.processconfiguration)
.replace('Ensuring file permissions are set correctly, this could take a few seconds...', settings.permcheck)
.replace('Pulling Docker container image, this could take a few minutes to complete...', settings.dockerpull)
.replace('Finished pulling Docker container image', settings.finishpull)
.replace(/(?:\r\n|\r|\n)$/im, '') +
'\u001b[0m'
);
};
1.3 In same file replace " const handlePowerChangeEvent = (state: string) =>
terminal.writeln(TERMINAL_PRELUDE + 'Server marked as ' + state + '...\u001b[0m');" by :
const handlePowerChangeEvent = (state: string) => {
if(state === 'starting') {
terminal.writeln(TERMINAL_PRELUDE + powersettings.starting);
} else if (state === 'started') {
terminal.writeln(TERMINAL_PRELUDE + powersettings.started);
} else if (state === 'offline') {
terminal.writeln(TERMINAL_PRELUDE + powersettings.offline);
}
}
Edit all message in settings.
For add color https://tforgione.fr/posts/ansi-escape-codes/
IF you want to replace custom things see the customsettings.
If you don't have yarn install it :
apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
apt -y install nodejs
cd /var/www/pterodactyl
npm i -g yarn
yarn install
And build the panel assets :
yarn build:production
php artisan migrate
chown -R www-data:www-data *
FOR A URGENT HELP CONTACT ME DIRECTLY BY SMS OR EMAIL!!
If you need help contact me on discord : http://discord.bagou450.com/ (or https://discord.gg/bagou450)
You don't have discord ? Send me a SMS to +33 7 56 89 00 36 (Unsurcharged number, No call)
You prefer emails? Send a email to contact@bagou450.com