osmo-service-respawn: Add a shell script that spawns and respawns services

Adjust the oom_score_adj of the shell script to avoid ever beeing
killed. Adjust the score of the child and nice it. Sleep a given
interval before respawning it.

This script creates a .pid file so it can be used by a sysv init
script to stop the respawner and the client.
diff --git a/recipes-osmocom/osmo-service-respawn/osmo-service-respawn_1.0.bb b/recipes-osmocom/osmo-service-respawn/osmo-service-respawn_1.0.bb
new file mode 100644
index 0000000..8779f34
--- /dev/null
+++ b/recipes-osmocom/osmo-service-respawn/osmo-service-respawn_1.0.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "Shell script to start, nice and respawn services"
+HOMEPAGE = "http://openbsc.osmocom.org/"
+LICENSE = "AGPLv3+"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
+
+SRC_URI = "file://osmo-service-respawn.sh"
+
+RDEPENDS_${PN} = "bash"
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0775 ${WORKDIR}/osmo-service-respawn.sh ${D}${bindir}
+}