collectd: sqm_collect: handle being orphaned
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Tue, 28 Sep 2021 09:42:45 +0000 (10:42 +0100)
committerKevin Darbyshire-Bryant <6500011+ldir-EDB0@users.noreply.github.com>
Sat, 2 Oct 2021 19:37:08 +0000 (20:37 +0100)
commit8322059f01abaabc293b854dc4f1768816654f52
tree9a2e24810717b811d8554b3596b199dd26c84d35
parent401291ba7e97a696d7f7657f2b483781dee980a2
collectd: sqm_collect: handle being orphaned

If the master collectd instance gets shut down in an uncontrolled
manner (crashes!) then sqm_collect scripts will be left orphaned and
will run forever.

Modify script to check if it still has a parent and if not, exit.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
utils/collectd/Makefile
utils/collectd/files/exec-scripts/sqm_collectd.sh