diff --git a/lib/modules/ipfs/index.js b/lib/modules/ipfs/index.js index 4ed8c6ab..a70bafd9 100644 --- a/lib/modules/ipfs/index.js +++ b/lib/modules/ipfs/index.js @@ -26,6 +26,10 @@ class IPFS { this.addObjectToConsole(); this.registerUploadCommand(); + this.events.request("processes:register", "ipfs", (cb) => { + self.startProcess(cb); + }); + this._checkService((err) => { if (!err) { return; @@ -33,8 +37,7 @@ class IPFS { self.logger.info("IPFS node not found, attempting to start own node"); this.listenToCommands(); this.registerConsoleCommands(); - self.startProcess(() => {}); - this.events.request("processes:launch", "ipfs", () => {}); + this.events.request('processes:launch', 'ipfs'); }); } }