Files
pterodactyl-panel/resources/scripts/lib/serverStatus.ts
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

11 lines
556 B
TypeScript

const INSTALLING_STATUSES: ReadonlySet<string> = new Set(['installing', 'install_failed', 'reinstall_failed']);
export const SKIPPED_INSTALL_SCRIPT_MESSAGE =
"This server is configured to skip its egg's install script. Reinstalling is not available until that setting is disabled.";
export const isInstallingStatus = (status: string | null): boolean =>
status !== null && INSTALLING_STATUSES.has(status);
export const canReinstallServer = (status: string | null, skipScripts: boolean): boolean =>
!skipScripts || isInstallingStatus(status);