I have script that start and shutdown the application.
where should i place my script so that it can execute at my OS shutdown ?
Pls help me...
I have the following bash script on debian with the LSB header:
### BEGIN INIT INFO
# Provides: shutdown_vms
# Required-Stop: gdm vmware $local_fs $remote_fs $network
# Default-Stop: 0 2 3 4 5 6
# Short-Description: Shutdown vms
# Description: Shutdown vms
### END INIT INFO
The script shutdown guest vms when host is shutdown.
I wrote a script that suspend all my virtualbox machines, and put a line in /etc/rc.local.shutdown, but it doesn't seem to work,
su - XX -c /XX
When I'm booted next time, virtualbox tells me the machine was Aborted, so the script wasn't executed. (Launching that script manually works for me)
P.S I already enabled shutdown.target