Browse Source

add venus start

master
zeus 4 years ago
parent
commit
ff2ccbc3f8
  1. 7
      llo/connect-new.js

7
llo/connect-new.js

@ -306,10 +306,10 @@ docker run -d \
fs.writeFileSync(`./hybrid/connect/${res.bootstrapstackid}/swarmlabstatus`, 'wgstatusclient=off'); fs.writeFileSync(`./hybrid/connect/${res.bootstrapstackid}/swarmlabstatus`, 'wgstatusclient=off');
const myExecLog = ` const myExecLog = `
#!/bin/bash #!/bin/sh
date=$(date '+%Y-%m-%d-%H:%M') date=`date '+%Y-%m-%d-%H:%M'`
node /usr/local/bin/venus-stats.js --insert=yes --port=${mongoserver.mongo_port} --ip='127.0.0.1' --user=swarmlab --password=${mongoserver.mongo_pass} --db=${mongoserver.mongo_db} --coll=${mongoserver.mongo_coll} --json=$date node /usr/local/bin/venus-stats.js --insert=yes --port=${mongoserver.mongo_port} --ip='127.0.0.1' --user=swarmlab --password=${mongoserver.mongo_pass} --db=${mongoserver.mongo_db} --coll=${mongoserver.mongo_coll} --json=$date
` `
fs.writeFileSync(`./hybrid/connect/${res.bootstrapstackid}/scripts/1/logs`, myExecLog); fs.writeFileSync(`./hybrid/connect/${res.bootstrapstackid}/scripts/1/logs`, myExecLog);
@ -353,6 +353,7 @@ console.log(RES.dev_name)
// *** save wg config file wg0.conf // *** save wg config file wg0.conf
// ***************************************** // *****************************************
(async() => { (async() => {
fs.mkdirSync(`./hybrid/connect/${res.bootstrapstackid}`, { recursive: true });
RES.serverconf = await wg_save_clientconf(RES) RES.serverconf = await wg_save_clientconf(RES)
RES.serverrun = await wg_save_ifup_linux(RES) RES.serverrun = await wg_save_ifup_linux(RES)
RES.serverconnect = await wg_save_connect_linux(RES) RES.serverconnect = await wg_save_connect_linux(RES)

Loading…
Cancel
Save