fix(core): update
This commit is contained in:
parent
01c7d2e482
commit
de831b086f
@ -17,10 +17,17 @@ export class SmartDaemon {
|
|||||||
this.systemdManager = new SmartDaemonSystemdManager(this);
|
this.systemdManager = new SmartDaemonSystemdManager(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async addService(serviceName: string, workingDirectory): Promise<SmartDaemonService> {
|
public async addService(serviceNameArg: string, commandArg: string, workingDirectory?: string): Promise<SmartDaemonService> {
|
||||||
|
let serviceToAdd: SmartDaemonService;
|
||||||
const existingService = this.serviceMap.find(serviceArg => {
|
const existingService = this.serviceMap.find(serviceArg => {
|
||||||
return serviceArg
|
return serviceArg.name === serviceNameArg;
|
||||||
})
|
});
|
||||||
|
if (!existingService) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
return serviceToAdd;
|
||||||
};
|
};
|
||||||
|
|
||||||
public async init() {
|
public async init() {
|
||||||
|
@ -24,9 +24,3 @@ export {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// third party
|
// third party
|
||||||
|
|
||||||
import * as fs from 'fs-extra';
|
|
||||||
|
|
||||||
export {
|
|
||||||
fs
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user