Start RestAPI container when sonic boots (#4140)
* Start RestAPI container when sonic boots
This commit is contained in:
parent
fb3253329e
commit
a9f3619901
16
files/build_templates/restapi.service.j2
Normal file
16
files/build_templates/restapi.service.j2
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user