[swss.sh] When starting, call 'systemctl restart' on dependents, not (#3807)

'systemctl start'
This commit is contained in:
Joe LeVeque 2019-11-22 20:39:09 -08:00 committed by Ying Xie
parent f943440fcb
commit 351410ea8c

View File

@ -85,7 +85,9 @@ start_peer_and_dependent_services() {
if [[ x"$WARM_BOOT" != x"true" ]]; then
/bin/systemctl start ${PEER}
for dep in ${DEPENDENT}; do
/bin/systemctl start ${dep}
# Here we call `systemctl restart` on each dependent service instead of `systemctl start` to
# ensure the services actually get stopped and started in case they were not previously stopped.
/bin/systemctl restart ${dep}
done
fi
}