Files
pterodactyl-panel/resources/scripts/lib/serverStatus.ts
T

11 lines
556 B
TypeScript
Raw Normal View History

2026-10-05 18:10:18 -04:00
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);