From 66d5b4cc2b1d2439a10b442bff54ef5dab73df7b Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Wed, 10 May 2017 21:12:35 +0000 Subject: [PATCH] [docker-syncd-cavm]: Properly manage syncd with supervisord --- platform/cavium/docker-syncd-cavm/syncd.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/platform/cavium/docker-syncd-cavm/syncd.sh b/platform/cavium/docker-syncd-cavm/syncd.sh index 24767dfc6e0a..6d578f3f6bb3 100755 --- a/platform/cavium/docker-syncd-cavm/syncd.sh +++ b/platform/cavium/docker-syncd-cavm/syncd.sh @@ -3,20 +3,18 @@ export XP_ROOT=/usr/bin/ while true; do - # Check if redis-server starts + RESULT=$(redis-cli ping) - result=$(redis-cli ping) - - if [ "$result" == "PONG" ]; then - - redis-cli FLUSHALL - syncd -p /etc/ssw/AS7512/profile.ini -N + if [ "$RESULT" == "PONG" ]; then break - fi sleep 1 - done + +redis-cli FLUSHALL + +exec syncd -p /etc/ssw/AS7512/profile.ini -N +