Start RestAPI container when sonic boots (#4140)
* Start RestAPI container when sonic boots
This commit is contained in:
parent
651f4a068e
commit
af4e84298a
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
|
Reference in New Issue
Block a user