Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How to trigger a program when shutdown occurs and trigger the another program when login occurs in Ubuntu

share|improve this question
2  
Have You tried such solution –  Misery Feb 10 '12 at 12:34

1 Answer 1

If you want to run in shutdown you should add your script file into /etc/rc6.d/. If you want to run the things in reboot you should add you script file to /etc/rc0.d/.

Make sure at the first of your script file name should be K99. After creating your script file run chmod +x K99Something to give neccessary permission.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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