I have two containers in Ubuntu Server 14.04 LTS and I want them to restart automatically on unexpected reboots. I have the below script, that restarts only one container. My requirement is to restart both the containers with time gap of 2 minutes. How do I do that?

My /etc/init/service-name.conf script now looks like this:

description "service description"
author "me" start on filesystem and started docker stop on runlevel [!2345] respawn script /usr/bin/docker start -a db5e61a9afa8 end script

Regards, Suresh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.