Docker: Add a delay until snmpd unix socket created

This commit is contained in:
Olof hagsand 2022-11-28 10:33:11 +01:00
parent 2cdc78c576
commit 7a388b960a
3 changed files with 4 additions and 3 deletions

View file

@ -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"