From de831b086fee2c348b71a6ebf7351bf59f3444b1 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 3 Sep 2019 15:24:49 +0200 Subject: [PATCH] fix(core): update --- ts/smartdaemon.classes.smartdaemon.ts | 13 ++++++++++--- ts/smartdaemon.plugins.ts | 6 ------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ts/smartdaemon.classes.smartdaemon.ts b/ts/smartdaemon.classes.smartdaemon.ts index dc92201..fa0684f 100644 --- a/ts/smartdaemon.classes.smartdaemon.ts +++ b/ts/smartdaemon.classes.smartdaemon.ts @@ -17,10 +17,17 @@ export class SmartDaemon { this.systemdManager = new SmartDaemonSystemdManager(this); } - public async addService(serviceName: string, workingDirectory): Promise { + public async addService(serviceNameArg: string, commandArg: string, workingDirectory?: string): Promise { + let serviceToAdd: SmartDaemonService; const existingService = this.serviceMap.find(serviceArg => { - return serviceArg - }) + return serviceArg.name === serviceNameArg; + }); + if (!existingService) { + + } else { + + } + return serviceToAdd; }; public async init() { diff --git a/ts/smartdaemon.plugins.ts b/ts/smartdaemon.plugins.ts index 9133f07..bcd0c15 100644 --- a/ts/smartdaemon.plugins.ts +++ b/ts/smartdaemon.plugins.ts @@ -24,9 +24,3 @@ export { }; // third party - -import * as fs from 'fs-extra'; - -export { - fs -}; \ No newline at end of file