I have a back up script in ~/scripts/backup.sh
and my upstart conf in ~/.config/upstart/shutdown.conf
.
description "my shutdown script"
start on desktop-end
task
console log
script
exec ~/scripts/backup.sh start
end script
My script backs up to an external hard drive on desktop-end
but the external hard drive gets unmounted before my script is called.
How can I precede the shutdown sequence with my script and then resume only when my script is done?
I tried the solution from this post but the hook on starting rc
isn't working.
Thanks.