Вопрос

I am running some services (apache,mongo,memcached) as a non privileged user. What is the best way to ensure they start automatically if the machine reboots or they crash?

Это было полезно?

Решение

The way i solved this way back when, was by having a script that ran every minute from cron. This script then checked to make sure everything i wanted to run was in fact running, and started it if it wasn't.

I probably wouldn't consider this "the best way", but it worked.

Другие советы

The other possible option will be to use monit or mon tools. They are able to monitor running services and restart them.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top