sonic-buildimage/files/build_templates/swss.service.j2

17 lines
515 B
Plaintext
Raw Normal View History

[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