diff --git a/docker/main/Makefile.in b/docker/main/Makefile.in index 038331e4..b11d81f2 100644 --- a/docker/main/Makefile.in +++ b/docker/main/Makefile.in @@ -83,7 +83,7 @@ push: # therefore the sleep 1 before tests start test: docker ./cleanup.sh ; ./start.sh # kill (ignore error) and the start it - sudo docker exec -t clixon-system bash -c 'sleep 2 && cd /usr/local/bin/test && detail=true ./sum.sh' + sudo docker exec -t clixon-system bash -c 'cd /usr/local/bin/test && detail=true ./sum.sh' depend: diff --git a/docker/main/start.sh b/docker/main/start.sh index a946e35d..95936506 100755 --- a/docker/main/start.sh +++ b/docker/main/start.sh @@ -88,6 +88,9 @@ CONFIG=${CONFIG:-$CONFIG0} >&2 echo -n "Starting Backend..." sudo docker run -p $PORT:80 -p $SPORT:443 --name clixon-system --rm -e DBG=$DBG -e CONFIG="$CONFIG" -e STORE="$STORE" -td clixon/clixon-system || err "Error starting clixon-system" +# Wait for snmpd to start +sudo docker exec -t clixon-system bash -c 'while [ ! -S /var/run/snmp.sock ]; do sleep 1; done' + >&2 echo "clixon-system started" diff --git a/docker/main/startsystem_native.sh b/docker/main/startsystem_native.sh index e287e37b..bc881402 100755 --- a/docker/main/startsystem_native.sh +++ b/docker/main/startsystem_native.sh @@ -129,8 +129,6 @@ openssl req -x509 -config ./ca.cnf -nodes -newkey rsa:4096 -keyout /etc/ssl/priv # use Docker logs to see what's happening. snmpd -Lo -p /var/run/snmpd.pid -I -ifXTable -I -ifTable -I -system_mib -I -sysORTable -I -snmpNotifyFilterTable -I -snmpNotifyTable -I -snmpNotifyFilterProfileTable -sleep 3 - # Alt: let backend be in foreground, but test scripts may # want to restart backend /bin/sleep 100000000