From 3bec2644f8e596c62f8e081b46806012149c0c77 Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 20 May 2021 01:44:19 +0300 Subject: [PATCH] add interfaces docker --- hybrid/scripts/check-wg-connection.sh | 18 +++++++++--------- llo/connect-new.js | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hybrid/scripts/check-wg-connection.sh b/hybrid/scripts/check-wg-connection.sh index e039eb1..7ed992d 100755 --- a/hybrid/scripts/check-wg-connection.sh +++ b/hybrid/scripts/check-wg-connection.sh @@ -1,15 +1,15 @@ #!/bin/bash declare -a wgint -for fint in $(docker inspect --format '{{.HostConfig.NetworkMode}}' $(docker ps --format '{{ .Names }}') | grep "^swlab"); do - #echo $fint - ff=$fint - ff="${ff#"${ff%%[![:space:]]*}"}" - ff="${ff%"${ff##*[![:space:]]}"}" - ff=${ff:5} - #echo $ff - wgint+=($ff) -done +#for fint in $(docker inspect --format '{{.HostConfig.NetworkMode}}' $(docker ps --format '{{ .Names }}') | grep "^swlab"); do +# #echo $fint +# ff=$fint +# ff="${ff#"${ff%%[![:space:]]*}"}" +# ff="${ff%"${ff##*[![:space:]]}"}" +# ff=${ff:5} +# #echo $ff +# wgint+=($ff) +#done for f in /sys/class/net/swlab*; do if [ -L "$f" ]; then f=$(basename $f) diff --git a/llo/connect-new.js b/llo/connect-new.js index 91eb145..403f82c 100644 --- a/llo/connect-new.js +++ b/llo/connect-new.js @@ -555,13 +555,13 @@ app.get('/getwginterfaces', (req, res, next) => { }); log.stderr.on('data', function (data) { - //console.log('error '+JSON.stringify(n)); RES.code = req.query["action"] RES.token = req.query["token"] RES.error = true RES.error_msg = "no" RES.data = data.toString(); - res.json(RES.data) + console.log('error '+JSON.stringify(RES)); + //res.json(RES.data) }); log.stdout.on('data', function (data) {