729f343f77
* [database] Implement the auto-restart feature for database container. Signed-off-by: Yong Zhao <yozhao@microsoft.com> * [database] Remove the duplicate dependency in service files. Since we already have updategraph ---> config_setup ---> database, we do not need explicitly add database.service in all other container service files. Signed-off-by: Yong Zhao <yozhao@microsoft.com> * [event listener] Reorganize the line 73 in event listener script. Signed-off-by: Yong Zhao <yozhao@microsoft.com> * [database] update the file sflow.service.j2 to remove the duplicate dependency. Signed-off-by: Yong Zhao <yozhao@microsoft.com> * [event listener] Add comments in event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com> * [event listener] Update the comments in line 56. Signed-off-by: Yong Zhao <yozhao@microsoft.com> * [event listener] Add parentheses for if statement in line 76 in event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
19 lines
401 B
Django/Jinja
19 lines
401 B
Django/Jinja
[Unit]
|
|
Description=Database container
|
|
Requires=docker.service
|
|
After=docker.service
|
|
After=rc-local.service
|
|
StartLimitIntervalSec=1200
|
|
StartLimitBurst=3
|
|
|
|
[Service]
|
|
User=root
|
|
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
|