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, it 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?