config/sysinv/sysinv-fpga-agent/sysinv-conf-watcher.service
Chris Friesen 24273472e6 restart sysinv-fpga-agent when sysinv.conf changes
There's a problem on initial startup where sysinv-fpga-agent starts
up before sysinv.conf has the correct puppet server address, and
then doesn't get restarted once sysinv.conf is updated.

This creates a systemd entity that watches the sysinv.conf file
and any time the file is modified it triggers a restart of
sysinv-fpga-agent.

There may be a cleaner way to do this, but I was unable to find one.
Subscribing to the file in puppet didn't seem to work in my testing.

Change-Id: I367eeaad5ee8cfeb3536281d78f44cea284f3de6
Story: 2006740
Task:  39927
2020-06-09 10:51:03 -06:00

12 lines
219 B
Desktop File

[Unit]
Description=StarlingX conf watcher
After=sysinv-fpga-agent.service
Before=pmon.service
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl restart sysinv-fpga-agent.service
[Install]
WantedBy=multi-user.target