1

Is there a good way to run a shutdown hook when I shutdown my Ubuntu 18.04 machine? I need to a run a script that might take about 30 seconds, to be specific pushing to git remotes any dangling changes.

  • 1
    What you're asking is basically a duplicate, a more specifically this: askubuntu.com/a/795406/295286 Personally, I'd do it the other way around, make a script/function that pushes stuff first, then calls shutdown. – Sergiy Kolodyazhnyy Jul 23 '18 at 4:08

Browse other questions tagged or ask your own question.