I've been looking through various pages on this site and others looking for a way to execute a script on shutdown and restart, but none of them are working for me.
I've tried placing bash scripts in /etc/init.d/ and linking them to /etc/rc0.d/ and /etc/rc6.d/, but they won't run on shutdown or restart. I've also tried using the update-rc.d command to create new services, but
- they don't work, and
- they don't even create a new link in the
rc?.dfolders.