Respawn a process forever with ::respawn: in inittab
Add a ::respawn: line to BusyBox /etc/inittab so init restarts a daemon every time it exits, with no extra supervisor installed.
When a daemon must always be running and the image has no systemd, BusyBox init can supervise it. An inittab line has the form id:runlevels:action:process, and BusyBox ignores the runlevels field, which is why the usual lines begin with ::. The respawn action starts the process and starts it again whenever it exits.
::respawn:/usr/sbin/sensord --foregroundThe process must stay in the foreground. A daemon that forks and exits looks to init like a process that died, so init starts another copy, and then another. Pass the program's no-daemonize flag, or wrap it so the wrapper itself stays alive.
ps | grep sensord
kill $(pidof sensord); sleep 1; pidof sensord 212 root /usr/sbin/sensord --foreground
247The second command prints a new pid, since init replaced the process we killed (the numbers will differ). The BusyBox init documentation lists the actions in the source header comment. BusyBox does not document any back-off, so a program that exits immediately on a bad config will be restarted in a tight loop; put a short sleep in a wrapper script if that is a risk. Init rereads inittab on kill -HUP 1.