This commit is contained in:
Hiro Protagonist 2016-09-09 09:24:38 +12:00
parent d405c6d3af
commit 5bbea7294b

View file

@ -4,7 +4,7 @@ const fs = require('fs');
let pid;
let config = JSON.parse(fs.readFileSync('./config.js'));
let p = spawn(`ssh -p ${config['ssh-port']} -f -N -R ${process.argv[2]}:localhost:22 -f -N -R 0.0.0.0:${process.argv[3]}:${config.camIP}:${process.argv[4]} ${config['ssh-user']}@${config.master.replace(/(http\:\/{2}|\:[0-9]+)/g, '')} && pidof ssh`, {
let p = spawn(`ssh -p ${config['ssh-port']} -f -N -R ${process.argv[2]}:localhost:22 -f -N -R 0.0.0.0:${process.argv[3]}:${config.camIP}:${process.argv[4]} ${config['ssh-user']}@${config.master.replace(/((http|https)\:\/{2}|\:[0-9]+)/g, '')} && pidof ssh`, {
shell: true,
detached: false
})