diff --git a/src/services/headless/FikaHeadlessProfileService.ts b/src/services/headless/FikaHeadlessProfileService.ts index efba3dcc..59c9732e 100644 --- a/src/services/headless/FikaHeadlessProfileService.ts +++ b/src/services/headless/FikaHeadlessProfileService.ts @@ -170,14 +170,13 @@ export class FikaHeadlessProfileService { await this.fileSystem.ensureDir(scriptsFolderPath); } + const scriptName = `Start_${profileId}.bat`; + const scriptPath = path.join(scriptsFolderPath, scriptName); + const templatePath = path.join(scriptsFolderPath, "_TEMPLATE.bat"); const templateContent = await this.fileSystem.read(templatePath); - const scriptContent = templateContent.replace("${profileId}", profileId).replace("${backendUrl}", backendUrl); - const scriptName = `Start_${profileId}.bat`; - const scriptPath = path.join(scriptsFolderPath, scriptName); - await this.fileSystem.write(scriptPath, scriptContent); this.logger.success(`Generated launch script: /fika-server/assets/scripts/${scriptName}`);