Skip to content

Commit

Permalink
Start RestAPI container when sonic boots (sonic-net#4140)
Browse files Browse the repository at this point in the history
* Start RestAPI container when sonic boots
  • Loading branch information
sumukhatv authored and pphuchar committed Mar 9, 2020
1 parent b7d2ac7 commit e9d6d7e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions files/build_templates/restapi.service.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=RestAPI container
Requires=updategraph.service
After=updategraph.service
Before=ntp-config.service

[Service]
User={{ sonicadmin_user }}
ExecStartPre=/usr/bin/{{docker_container_name}}.sh start
ExecStart=/usr/bin/{{docker_container_name}}.sh wait
ExecStop=/usr/bin/{{docker_container_name}}.sh stop
Restart=always
RestartSec=30

[Install]
WantedBy=multi-user.target

0 comments on commit e9d6d7e

Please sign in to comment.