I need to execute a script during shutdown&#x2F;termination of an AWS instance(debian). I added my script to the &#x2F;etc&#x2F;init.d&#x2F;myscript and a symlink to &#x2F;etc&#x2F;rc0.d&#x2F;K01myscript however I noticed that when I terminate the instance I don&#x27;t see that my script is executed. Any idea?
Run a script during shutdown/termination of an aws instance