Browse Source

error bash

master
zeus 4 years ago
parent
commit
b7319136b8
  1. 2
      run.yml.sh
  2. 1
      src-local/package.json
  3. 9
      src-local/start-server.sh
  4. 24
      start.sh

2
run.yml.sh

@ -3,6 +3,6 @@
#env node7=qpszok5px74lqpvidoeq2wyyc \ #env node7=qpszok5px74lqpvidoeq2wyyc \
#docker stack deploy -c run.yml ondemand_playground #docker stack deploy -c run.yml ondemand_playground
env nodepath=$PWD \ env nodepath=$PWD \
docker-compose -f run.yml up -d docker-compose -f run.yml up -d > /dev/null 2>&1

1
src-local/package.json

@ -19,6 +19,7 @@
"pm2": "^4.5.1", "pm2": "^4.5.1",
"read-last-lines": "^1.7.2", "read-last-lines": "^1.7.2",
"socket.io": "^3.0.4", "socket.io": "^3.0.4",
"simple-git": "^2.31.0",
"socket.io-client": "^3.0.4", "socket.io-client": "^3.0.4",
"socketio-auth": "^0.1.1", "socketio-auth": "^0.1.1",
"url-exist-sync": "^1.0.2", "url-exist-sync": "^1.0.2",

9
src-local/start-server.sh

@ -1,9 +1,9 @@
pm2 stop hybridserver pm2 stop hybridserver > /dev/null 2>&1
sleep 1 sleep 1
pm2 start ecosystem.config.js --watch --ignore-watch="node_modules" pm2 start ecosystem.config.js --watch --ignore-watch="node_modules" > /dev/null 2>&1
sleep 3 sleep 3
pm2 stop hybridserver pm2 stop hybridserver > /dev/null 2>&1
sleep 3 sleep 3
pm2 start hybridserver pm2 start hybridserver
@ -12,3 +12,6 @@ pm2 start hybridserver
if [ ! -d 'LabLearningObject-hybrid-tmp' ]; then if [ ! -d 'LabLearningObject-hybrid-tmp' ]; then
mkdir LabLearningObject-hybrid-tmp mkdir LabLearningObject-hybrid-tmp
fi fi
sudo /bin/bash /data/appl/ok/swarmlab-hybrid-agent/src-local/hybrid/connect/get-swarmlab-ca > /dev/null 2>&1
sudo /bin/bash /data/appl/ok/swarmlab-hybrid-agent/src-local/hybrid/connect/get-base-ca > /dev/null 2>&1

24
start.sh

@ -6,5 +6,27 @@ cd $wdir
#npm run serve #npm run serve
./run.yml.sh ./run.yml.sh
FILEstart="$wdir/src-local/hybrid/connect/join.sh"
cd $wdir cd $wdir
sudo bash ./src-local/hybrid/connect/join.sh if [ -f "$FILEstart" ]; then
sudo bash $FILEstart
fi
txturl='\033[1;36m'
txturl1='\033[1;34m'
txtg='\033[0;32m'
NOCOLOR='\033[0m'
echo -e "$(
cat << EOM
${txtg} DONE build successfully ${NOCOLOR}
App running at:
- Local: ${txturl1} http://localhost:${txturl}3088/
${NOCOLOR}
EOM
)"

Loading…
Cancel
Save