sonic-buildimage/files/build_templates/swss.service.j2
Ying Xie cfe01f19e4
Separate syncd service from swss service (#2051)
* [swss.sh] refactor ssh service script code

- Move checks and waits to helper functions.
- Remove early returns from code stream

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [swss.sh] Add debug log for service state changes

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [syncd] Separate out syncd service from swss service

Still make them start/stop/restart synchronously so existing scripts
continue working.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* Remove extra 'After' in swss service and remove syncd docker warm boot code

Syncd warm boot needs more thinking, we can put it back once the work
flow has been defined and ready for coding/testing.

* [syncd] syncd start/stop/restart shouldn't affect swss state

Semi-detach syncd service state change from swss:

- swss state change still chase syncd service to follow except warm boot
- syncd state change will only affect itself.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* add missing '{'
2018-09-24 16:35:01 -07:00

20 lines
542 B
Django/Jinja

[Unit]
Description=switch state service
Requires=database.service updategraph.service
{% if sonic_asic_platform == 'broadcom' %}
Requires=opennsl-modules-4.9.0-7-amd64.service
{% elif sonic_asic_platform == 'nephos' %}
Requires=nps-modules-4.9.0-7-amd64.service
{% endif %}
After=database.service updategraph.service
After=interfaces-config.service
[Service]
User=root
Environment=sonic_asic_platform={{ sonic_asic_platform }}
ExecStart=/usr/local/bin/swss.sh start
ExecStop=/usr/local/bin/swss.sh stop
[Install]
WantedBy=multi-user.target