Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions files/scripts/syncd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,21 @@ stop() {
debug "Warm boot flag: ${SERVICE} ${WARM_BOOT}."

if [[ x"$WARM_BOOT" == x"true" ]]; then
debug "Warm shutdown syncd process ..."
/usr/bin/docker exec -i syncd /usr/bin/syncd_request_shutdown --warm
TYPE=warm
else
TYPE=cold
fi

# wait until syncd quits gracefully
while docker top syncd | grep -q /usr/bin/syncd; do
sleep 0.1
done
debug "${TYPE} shutdown syncd process ..."
/usr/bin/docker exec -i syncd /usr/bin/syncd_request_shutdown --${TYPE}

/usr/bin/docker exec -i syncd /bin/sync
debug "Finished warm shutdown syncd process ..."
fi
# wait until syncd quits gracefully
while docker top syncd | grep -q /usr/bin/syncd; do
sleep 0.1
done

/usr/bin/docker exec -i syncd /bin/sync
debug "Finished ${TYPE} shutdown syncd process ..."

/usr/bin/${SERVICE}.sh stop
debug "Stopped ${SERVICE} service..."
Expand Down