How do I configure my Amazon Linux service to auto-restart if it fails?
1
I'm using Amazon Linux. I have a script to start and stop a service, written in bash, located at /etc/init.d/wildfly At the various run levels, I have symlinks to ensure the script starts and stops, for instance /etc/rc.d/rc3.d/S80wildfly /etc/rc.d/rc2.d/S80wildfly But my question is, what do I need to do to ensure if the service fails, ti can automatically restart? I read on CentOS, you can create a file (e.g. "wildfly.service") with the directives Restart=always RestartSec=3 Where do the equivalent directives live on Amazon Linux?
services amazon-ec2 autostart amazon-linux
share | improve this question
asked Dec 20 '18 at 20:2...