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>
PKG_NAME:=collectd
PKG_VERSION:=5.12.0
-PKG_RELEASE:=12
+PKG_RELEASE:=13
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://collectd.org/files/ \
json_cleanup
}
-while true ; do
+# while not orphaned
+while [ $(awk '$1 ~ "^PPid:" {print $2}' /proc/$$/status) -ne 1 ] ; do
for ifc in "$@" ; do
process_qdisc "$ifc"
done