I'm running a my service on a Amazon EC2 create from a CloudFormation script.
I put service file in /etc/rc.d/init.d/myService. (includeing "start" and "stop" functions).
I've also linked it like this:
/etc/rc.d/rc0.d/K00myService -> /etc/rc.d/init.d/myService
/etc/rc.d/rc6.d/K00myService -> /etc/rc.d/init.d/myService
But, when I delete the CloudFormation stack and the EC2 goes down the "stop" service is never called.
The linux version:
~> cat /etc/*-release NAME="Amazon Linux AMI" VERSION="2015.03" ID="amzn" ID_LIKE="rhel fedora" VERSION_ID="2015.03" PRETTY_NAME="Amazon Linux AMI 2015.03" ANSI_COLOR="0;33" CPE_NAME="cpe:/o:amazon:linux:2015.03:ga" HOME_URL="http://aws.amazon.com/amazon-linux-ami/" Amazon Linux AMI release 2015.03 What am I missing?