Only use this if you really need it, on further inspection writing a systemd watchdog would be a better choice for libreelec et all (no idea why they use systemd, but whatever)
(actually just libreelec, on multiuser oses surely a service supervisor can supervise kodi?)
writes to /dev/watchdog0 every 5 seconds or so, the machine should reboot if that doesn't happen (may need stuff in config.txt if you try this on raspberries)