Linux

How to make sure a Service starts automatically after a reboot or crash?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

Depends on the init system.

Systemd: systemctl enable [service_name] System V: update-rc.d [service_name] and add this line id:5678:respawn:/bin/sh /path/to/app to /etc/inittab Upstart: add Upstart init script at /etc/init/service.conf