I want to run a script on poweroff in Ubuntu. so I made a script, placed it in init.d & made a softlink in rc0.d with name S36xyz. my script is working perfectly when I run it in terminal. so there is not any problem with script.
But my script is executing at poweron rather than poweroff. I don’t know what I am doing wrong. Can any one help me with this.