Browse Source

check docker-compose

master
zeus 4 years ago
parent
commit
a8a0491a77
  1. 4
      install.sh
  2. 37
      start.sh

4
install.sh

@ -210,8 +210,8 @@ if [ $toolsok == 'ok' ];then
fi
if [ $toolsok == 'ok' ];then
cp -f $wdir/files/VuetableCssConfig.js $wdir/node_modules/vuetable-2/src/components/VuetableCssConfig.js
cp -f $wdir/files/serve.js $wdir/node_modules/@vue/cli-service/lib/commands/serve.js
#cp -f $wdir/files/VuetableCssConfig.js $wdir/node_modules/vuetable-2/src/components/VuetableCssConfig.js
#cp -f $wdir/files/serve.js $wdir/node_modules/@vue/cli-service/lib/commands/serve.js
cp -f $wdir/files/status.sh $wdir/src-local/hybrid/connect/status.sh
cp -f $wdir/files/get-swarmlab-ca $wdir/src-local/hybrid/connect/get-swarmlab-ca
cp -f $wdir/files/get-base-ca $wdir/src-local/hybrid/connect/get-base-ca

37
start.sh

@ -23,9 +23,37 @@ fi
#echo "full path dir $SFPATH"
#echo "relativ path dir $SRPATH"
#1.26.2
check_compose_version() {
composeversion=$(docker-compose version | head -1 | cut -d',' -f1 | cut -d' ' -f3)
version_good=$(echo $composeversion | awk 'BEGIN{ FS="."};
{ if ($1 < 1) { print "N"; }
else if ($1 == 1) {
if ($2 < 26) { print "N"; }
else { print "Y"; }
}
else { print "Y"; }
}')
echo "$version_good"
}
composeversioncheck=$(check_compose_version)
cwdir=$PWD
wdir=$SFPATH
cd $wdir
if [ "$composeversioncheck" == "N" ]; then
current=$(docker-compose version)
echo current docker-conpose version too low
echo current docker-compose: $current
echo required 1.26.0 minimum
else
compose=$(docker-compose -f test/run.yml config --services)
if [ "$compose" == "swarmlabclient" ]; then
#echo "compose ok"
./update-agent.sh
cd src-local
./start-server.sh
@ -59,3 +87,12 @@ ${NOCOLOR}
EOM
)"
else
current=$(docker-compose version)
echo current docker-compose version too low
echo current docker-compose: $current
echo required 1.26.0 minimum
#echo "compose not ok"
fi
fi

Loading…
Cancel
Save