diff --git a/files/build_templates/snmp.service.j2 b/files/build_templates/snmp.service.j2 index 5c753dd651eb..9d3224b805b7 100644 --- a/files/build_templates/snmp.service.j2 +++ b/files/build_templates/snmp.service.j2 @@ -10,6 +10,7 @@ StartLimitIntervalSec=1200 StartLimitBurst=3 [Service] +ExecStartPre=/bin/bash -c 'end=$((SECONDS+20));while [ $SECONDS -lt $end ];do if /usr/bin/pgrep intfmgrd >/dev/null;then break;else sleep 1;fi;done' ExecStartPre=/usr/local/bin/{{docker_container_name}}.sh start ExecStart=/usr/local/bin/{{docker_container_name}}.sh wait ExecStop=/usr/local/bin/{{docker_container_name}}.sh stop