I've read the answers to this and similar questions already, but so far none had worked for me.
On my Ubuntu 11.10 (oneiric) system, all the files in /etc/rc0.d/ and /etc/rc0.d/ are links. I put my script (called *shutdown_script*) in the /etc/init.d/ directory and created two symbolic links to it, one in /etc/rc0.d/ and the other in /etc/rc6.d, both with the name *K99shutdown_script*.
I want to make a log entry when Mint17 Cinnamon is shutdown.
Does anyone know how to do that?
Ideally I would create a file named ifshutdownthendo and inside that Bash script file would be commands that would be executed just like any normal Bash script file and when the file is completed then the shutdown proccess would start.
I have a bash shutdown script that takes 2-7 minutes to complete. I want this script to run at every system reboot and shutdown, and for shutdown to wait until it is finished before continuing with reboot or halt.
How can I do this?
Thanks so much!