Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

How can I make a bash script run only at shutdown? I have searched for it and keep coming up empty handed. I would be fine with either a link or an explanation to how to do it.

share|improve this question

marked as duplicate by jokerdino Jul 27 '13 at 17:06

This question was marked as an exact duplicate of an existing question.

I believe you add script to /etc/rc6.d/

You might want to read /etc/init.d/README

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.