2 Commits

Author SHA1 Message Date
382b694027 1.0.7 2019-09-03 15:24:50 +02:00
de831b086f fix(core): update 2019-09-03 15:24:49 +02:00
4 changed files with 12 additions and 11 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartdaemon", "name": "@pushrocks/smartdaemon",
"version": "1.0.6", "version": "1.0.7",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartdaemon", "name": "@pushrocks/smartdaemon",
"version": "1.0.6", "version": "1.0.7",
"private": false, "private": false,
"description": "start scripts as long running daemons and manage them", "description": "start scripts as long running daemons and manage them",
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -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() {

View File

@ -24,9 +24,3 @@ export {
}; };
// third party // third party
import * as fs from 'fs-extra';
export {
fs
};