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 tiantianlv committed Apr 24, 2020
1 parent 3b7f574 commit 4339482
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 4339482

Please sign in to comment.