From 760943fc6d031c20c984be9692d9277eaa66457c Mon Sep 17 00:00:00 2001 From: Satinder Grewal Date: Thu, 26 Jan 2017 00:05:50 +1300 Subject: [PATCH] corsproxy shepherd API update & OS X Installer download files fix update --- .../BitRock Installer Files/IgaunaApp-OSX.xml | 11 +++++++-- routes/shepherd.js | 23 +++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/assets/BitRock Installer Files/IgaunaApp-OSX.xml b/assets/BitRock Installer Files/IgaunaApp-OSX.xml index 8a0a755..6cb12ca 100644 --- a/assets/BitRock Installer Files/IgaunaApp-OSX.xml +++ b/assets/BitRock Installer Files/IgaunaApp-OSX.xml @@ -56,7 +56,11 @@ 0 - Downloading files + 0 + Zcash Params file: sprout-proving.key + Zcash Params file: sprout-proving.key + 0 + Downloading Zcash Params file 0 @@ -75,7 +79,10 @@ - Downloading files + 0 + Zcash Params file: sprout-verifying.key + Zcash Params file: sprout-verifying.key + Downloading Zcash Params files 0 diff --git a/routes/shepherd.js b/routes/shepherd.js index 93e663b..154e8b4 100644 --- a/routes/shepherd.js +++ b/routes/shepherd.js @@ -21,6 +21,7 @@ var shepherd = express.Router(); // IGUANA FILES AND CONFIG SETTINGS var iguanaConfsDirSrc = path.join(__dirname, '../assets/deps/confs'); +var CorsProxyBin = path.join(__dirname, '../node_modules/corsproxy/bin/corsproxy'); // SETTING OS DIR TO RUN IGUANA FROM // SETTING APP ICON FOR LINUX AND WINDOWS @@ -187,6 +188,28 @@ function herder(flock, data) { }); }); } + + if (flock === 'corsproxy') { + console.log('corsproxy flock selected...'); + console.log('selected data: '+data); + + pm2.connect(true,function(err) { //start up pm2 god + if (err) { + console.error(err); + process.exit(2); + } + + pm2.start({ + script: CorsProxyBin, // path to binary + name: 'CORSPROXY', //REVS, USD, EUR etc. + exec_mode : 'fork', + cwd: iguanaDir, + }, function(err, apps) { + pm2.disconnect(); // Disconnect from PM2 + if (err) throw err + }); + }); + } }