sonic-buildimage/files/build_templates/swss.service.j2
Oleksandr Ivantsiv 2b113c4175 Add FLUSH DB commands to swss service missed during merge (#248)
* Add FLUSH DB commands to swss service missed during merge

* Update swss.service.j2
2017-02-03 21:35:48 -08:00

17 lines
515 B
Django/Jinja

[Unit]
Description=switch state service container
Requires=database.service
After=database.service
[Service]
User={{ sonicadmin_user }}
ExecStartPre=/usr/bin/docker exec database redis-cli -n 0 FLUSHDB
ExecStartPre=/usr/bin/docker exec database redis-cli -n 1 FLUSHDB
ExecStartPre=/usr/bin/docker exec database redis-cli -n 2 FLUSHDB
ExecStart=/usr/bin/{{docker_container_name}}.sh start
ExecStop=/usr/bin/{{docker_container_name}}.sh stop
ExecStopPost=/usr/bin/syncd.sh stop
[Install]
WantedBy=multi-user.target