Docker: Add a delay until snmpd unix socket created
This commit is contained in:
parent
2cdc78c576
commit
7a388b960a
3 changed files with 4 additions and 3 deletions
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue